Skip to content

Commit 589b744

Browse files
committed
More variable naming improvements
1 parent dd2fabe commit 589b744

3 files changed

Lines changed: 14 additions & 14 deletions

File tree

include/mdtools/pattern_name_table.hh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@ public:
6666
Pattern_Name_Table& operator=(Pattern_Name_Table const&) noexcept = default;
6767
Pattern_Name_Table& operator=(Pattern_Name_Table&&) noexcept = default;
6868

69-
Line const& operator[](size_t const n) const noexcept {
70-
return table[n];
69+
Line const& operator[](size_t const index) const noexcept {
70+
return table[index];
7171
}
72-
Line& operator[](size_t const n) noexcept {
73-
return table[n];
72+
Line& operator[](size_t const index) noexcept {
73+
return table[index];
7474
}
7575

7676
virtual void write(std::ostream& output) const noexcept {

include/mdtools/tile.hh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -480,11 +480,11 @@ private:
480480
pointer operator->() const noexcept {
481481
return &(tile_data[loc]);
482482
}
483-
value_type operator[](difference_type n) const noexcept {
484-
return *operator+(n);
483+
value_type operator[](difference_type index) const noexcept {
484+
return *operator+(index);
485485
}
486-
reference operator[](difference_type n) noexcept {
487-
return *operator+(n);
486+
reference operator[](difference_type index) noexcept {
487+
return *operator+(index);
488488
}
489489
};
490490

src/tools/chunk_splitter.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -230,14 +230,14 @@ class Chunk {
230230
}
231231
return true;
232232
}
233-
[[nodiscard]] constexpr Blk const& get_block(int n) const noexcept {
234-
return blocks[n];
233+
[[nodiscard]] constexpr Blk const& get_block(int index) const noexcept {
234+
return blocks[index];
235235
}
236-
constexpr Blk& get_block(int n) noexcept {
237-
return blocks[n];
236+
constexpr Blk& get_block(int index) noexcept {
237+
return blocks[index];
238238
}
239-
constexpr void set_block(int n, Blk const& block) noexcept {
240-
blocks[n] = block;
239+
constexpr void set_block(int index, Blk const& block) noexcept {
240+
blocks[index] = block;
241241
}
242242
};
243243

0 commit comments

Comments
 (0)