Skip to content

Commit 309188c

Browse files
committed
rename oth -> other
1 parent db8c4a4 commit 309188c

File tree

7 files changed

+44
-42
lines changed

7 files changed

+44
-42
lines changed

src/base/type/uniquelist.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ template <class T> class UniqueList
237237
struct CommonIterateVal
238238
{
239239
const T &value;
240-
const std::size_t *othIx;
240+
const std::size_t *otherIx;
241241
};
242242

243243
struct common_iterator

src/chart/generator/buckets.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,10 @@ struct Buckets
4444
});
4545
}
4646

47-
[[nodiscard]] bool operator!=(const const_iterator &oth) const
47+
[[nodiscard]] bool operator!=(
48+
const const_iterator &other) const
4849
{
49-
return data.data() != oth.data.data();
50+
return data.data() != other.data.data();
5051
}
5152

5253
const_iterator &operator++();

src/chart/rendering/drawinterlacing.cpp

Lines changed: 32 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -34,35 +34,36 @@ void DrawInterlacing::drawGeometries(Gen::AxisId axisIndex) const
3434
|| guides.interlacings == false)
3535
return;
3636

37-
std::map<double, double> othWeights{{0.0, 0.0}, {1.0, 0.0}};
37+
std::map<double, double> otherWeights{{0.0, 0.0}, {1.0, 0.0}};
3838

39-
const auto &othGuides = parent.plot->guides.at(!axisIndex);
40-
const auto &othAxisStyle =
39+
const auto &otherGuides = parent.plot->guides.at(!axisIndex);
40+
const auto &otherAxisStyle =
4141
parent.rootStyle.plot.getAxis(!axisIndex);
42-
if (!othAxisStyle.interlacing.color->isTransparent()
43-
&& othGuides.interlacings != false)
44-
for (const auto &othInterval :
42+
if (!otherAxisStyle.interlacing.color->isTransparent()
43+
&& otherGuides.interlacings != false)
44+
for (const auto &otherInterval :
4545
parent.getIntervals(!axisIndex)) {
46-
if (Math::Floating::is_zero(othInterval.isSecond))
46+
if (Math::Floating::is_zero(otherInterval.isSecond))
4747
continue;
48-
auto min = std::max(othInterval.range.getMin(), 0.0);
49-
auto max = std::min(othInterval.range.getMax(), 1.0);
50-
auto mprev = std::prev(othWeights.upper_bound(min));
51-
auto mnext = othWeights.lower_bound(max);
48+
auto min = std::max(otherInterval.range.getMin(), 0.0);
49+
auto max = std::min(otherInterval.range.getMax(), 1.0);
50+
auto mprev = std::prev(otherWeights.upper_bound(min));
51+
auto mnext = otherWeights.lower_bound(max);
5252

5353
if (mprev->first < min)
54-
mprev =
55-
othWeights.try_emplace(mprev, min, mprev->second);
54+
mprev = otherWeights.try_emplace(mprev,
55+
min,
56+
mprev->second);
5657
if (mnext->first > max)
57-
mnext = othWeights.try_emplace(mnext,
58+
mnext = otherWeights.try_emplace(mnext,
5859
max,
5960
std::prev(mnext)->second);
6061

6162
while (mprev != mnext)
6263
mprev++->second +=
63-
Math::FuzzyBool::And<double>(othInterval.weight,
64-
othInterval.isSecond,
65-
othGuides.interlacings);
64+
Math::FuzzyBool::And<double>(otherInterval.weight,
65+
otherInterval.isSecond,
66+
otherGuides.interlacings);
6667
}
6768

6869
auto orientation = !+axisIndex;
@@ -94,28 +95,28 @@ void DrawInterlacing::drawGeometries(Gen::AxisId axisIndex) const
9495
guides.interlacings);
9596
auto interlacingColor = *axisStyle.interlacing.color * weight;
9697

97-
for (auto first = othWeights.begin(),
98+
for (auto first = otherWeights.begin(),
9899
next = std::next(first),
99-
last = othWeights.end();
100+
last = otherWeights.end();
100101
next != last;
101102
++next, ++first) {
102103
if (Math::Floating::is_zero(first->second))
103104
drawInterlacing(axisIndex,
104105
interlacingColor,
105106
rect(first->first, next->first));
106107
else if (axisIndex == Gen::AxisId::y) {
107-
auto color =
108-
interlacingColor
109-
+ *othAxisStyle.interlacing.color * first->second;
110-
111-
color.alpha =
112-
1
113-
- (1
114-
- axisStyle.interlacing.color->alpha
115-
* weight)
116-
* (1
117-
- othAxisStyle.interlacing.color->alpha
118-
* first->second);
108+
auto color = interlacingColor
109+
+ *otherAxisStyle.interlacing.color
110+
* first->second;
111+
112+
color.alpha = 1
113+
- (1
114+
- axisStyle.interlacing.color->alpha
115+
* weight)
116+
* (1
117+
- otherAxisStyle.interlacing
118+
.color->alpha
119+
* first->second);
119120

120121
if (weight + first->second > 1.0)
121122
color = Math::Niebloid::interpolate(

src/dataframe/impl/dataframe.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ void dataframe::add_series_by_other(std::string_view,
347347
const std::function<cell_value(record_type, cell_reference)> &,
348348
std::span<const std::pair<const char *, const char *>>) &
349349
{
350-
if (as_if()) error(error_type::unimplemented, "by oth");
350+
if (as_if()) error(error_type::unimplemented, "by other");
351351
}
352352

353353
void dataframe::remove_series(

src/dataframe/interface.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,14 @@ struct custom_aggregator
5858
id_type (*create)();
5959
double (*add)(id_type &, cell_reference const &);
6060

61-
auto operator<=>(const custom_aggregator &oth) const
61+
auto operator<=>(const custom_aggregator &other) const
6262
{
63-
return name <=> oth.name;
63+
return name <=> other.name;
6464
}
6565

66-
auto operator==(const custom_aggregator &oth) const
66+
auto operator==(const custom_aggregator &other) const
6767
{
68-
return name == oth.name;
68+
return name == other.name;
6969
}
7070
};
7171

src/dataframe/old/datatable.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ void DataTable::pushRow(const std::span<const char *const> &cells)
5555

5656
std::string DataTable::getInfos() const { return df.as_string(); }
5757

58-
bool DataCube::iterator_t::operator!=(const iterator_t &oth) const
58+
bool DataCube::iterator_t::operator!=(const iterator_t &other) const
5959
{
60-
return parent != oth.parent;
60+
return parent != other.parent;
6161
}
6262

6363
void DataCube::iterator_t::operator++() { parent->incr(*this); }

src/dataframe/old/datatable.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ class DataCube
125125
const DataCube *parent{};
126126
MultiIndex index;
127127

128-
[[nodiscard]] bool operator!=(const iterator_t &oth) const;
128+
[[nodiscard]] bool operator!=(const iterator_t &other) const;
129129

130130
void operator++();
131131

0 commit comments

Comments
 (0)