Use m_ prefix consistently for private/protected member variables

libeigen/eigen!2168

Co-authored-by: Rasmus Munk Larsen <rmlarsen@gmail.com>
This commit is contained in:
Rasmus Munk Larsen
2026-02-20 20:35:58 -08:00
parent 270ea539fa
commit a87ecfb179
6 changed files with 101 additions and 101 deletions

View File

@@ -155,16 +155,16 @@ class ArithmeticSequenceRange {
static constexpr Index SizeAtCompileTime = SizeAtCompileTime_;
static constexpr Index IncrAtCompileTime = IncrAtCompileTime_;
constexpr ArithmeticSequenceRange(Index first, Index size, Index incr) : first_{first}, size_{size}, incr_{incr} {}
constexpr ArithmeticSequenceRange(Index first, Index size, Index incr) : m_first{first}, m_size{size}, m_incr{incr} {}
constexpr Index operator[](Index i) const { return first() + i * incr(); }
constexpr Index first() const noexcept { return first_.value(); }
constexpr Index size() const noexcept { return size_.value(); }
constexpr Index incr() const noexcept { return incr_.value(); }
constexpr Index first() const noexcept { return m_first.value(); }
constexpr Index size() const noexcept { return m_size.value(); }
constexpr Index incr() const noexcept { return m_incr.value(); }
private:
variable_if_dynamicindex<Index, int(FirstAtCompileTime)> first_;
variable_if_dynamic<Index, int(SizeAtCompileTime)> size_;
variable_if_dynamicindex<Index, int(IncrAtCompileTime)> incr_;
variable_if_dynamicindex<Index, int(FirstAtCompileTime)> m_first;
variable_if_dynamic<Index, int(SizeAtCompileTime)> m_size;
variable_if_dynamicindex<Index, int(IncrAtCompileTime)> m_incr;
};
template <typename FirstType, typename SizeType, typename IncrType, int NestedSizeAtCompileTime>
@@ -221,14 +221,14 @@ class SingleRange {
static constexpr Index SizeAtCompileTime = Index(1);
static constexpr Index IncrAtCompileTime = Index(1); // Needs to be 1 to be treated as block-like.
constexpr SingleRange(Index v) noexcept : value_(v) {}
constexpr SingleRange(Index v) noexcept : m_value(v) {}
constexpr Index operator[](Index) const noexcept { return first(); }
constexpr Index first() const noexcept { return value_.value(); }
constexpr Index first() const noexcept { return m_value.value(); }
constexpr Index size() const noexcept { return SizeAtCompileTime; }
constexpr Index incr() const noexcept { return IncrAtCompileTime; }
private:
variable_if_dynamicindex<Index, int(ValueAtCompileTime)> value_;
variable_if_dynamicindex<Index, int(ValueAtCompileTime)> m_value;
};
template <typename T>
@@ -280,14 +280,14 @@ class AllRange {
static constexpr Index FirstAtCompileTime = Index(0);
static constexpr Index SizeAtCompileTime = SizeAtCompileTime_;
static constexpr Index IncrAtCompileTime = Index(1);
constexpr AllRange(Index size) : size_(size) {}
constexpr AllRange(Index size) : m_size(size) {}
constexpr Index operator[](Index i) const noexcept { return i; }
constexpr Index first() const noexcept { return FirstAtCompileTime; }
constexpr Index size() const noexcept { return size_.value(); }
constexpr Index size() const noexcept { return m_size.value(); }
constexpr Index incr() const noexcept { return IncrAtCompileTime; }
private:
variable_if_dynamic<Index, int(SizeAtCompileTime)> size_;
variable_if_dynamic<Index, int(SizeAtCompileTime)> m_size;
};
template <int NestedSizeAtCompileTime>