Skip to content

Commit d3f6c9e

Browse files
committed
Revert wrong format
1 parent 3b494c1 commit d3f6c9e

File tree

13 files changed

+55
-59
lines changed

13 files changed

+55
-59
lines changed

src/base/anim/interpolated.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,8 @@ template <typename Type> class Interpolated
230230
std::less<T>>;
231231
return !has_second ? this->values[0].value
232232
: std::min(this->values[0].value,
233-
this->values[1].value,
234-
Less{});
233+
this->values[1].value,
234+
Less{});
235235
}
236236

237237
template <typename T = Type> [[nodiscard]] T max() const
@@ -241,8 +241,8 @@ template <typename Type> class Interpolated
241241
std::less<T>>;
242242
return !has_second ? this->values[0].value
243243
: std::max(this->values[0].value,
244-
this->values[1].value,
245-
Less{});
244+
this->values[1].value,
245+
Less{});
246246
}
247247
};
248248

src/base/conv/parse.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ template <typename To> To parse(const std::string &string)
4343
[]<bool flag = false>()
4444
{
4545
static_assert(flag, "no conversion from string");
46-
}();
46+
}
47+
();
4748
}
4849

4950
}

src/base/conv/tostring.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ std::string toString(const From &value)
4747
[]<bool flag = false>()
4848
{
4949
static_assert(flag, "no string conversion");
50-
}();
50+
}
51+
();
5152
}
5253

5354
}

src/base/math/interpolation.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ namespace Math
88

99
template <typename T>
1010
requires(!std::is_same_v<std::remove_cvref_t<T>, bool>)
11-
auto interpolate(const T &op0,
12-
const T &op1,
13-
double factor) -> decltype(op0 * (1.0 - factor) + op1 * factor)
11+
auto interpolate(const T &op0, const T &op1, double factor)
12+
-> decltype(op0 * (1.0 - factor) + op1 * factor)
1413
{
1514
if (factor <= 0.0) return op0;
1615
if (factor >= 1.0) return op1;

src/base/refl/auto_struct.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -535,8 +535,8 @@ namespace Functors
535535
namespace Composite
536536
{
537537
template <class T, class U>
538-
constexpr inline auto operator>>(U &&arg,
539-
const T &) -> decltype(T::get(std::forward<U &&>(arg)))
538+
constexpr inline auto operator>>(U &&arg, const T &)
539+
-> decltype(T::get(std::forward<U &&>(arg)))
540540
{
541541
return T::get(std::forward<U &&>(arg));
542542
}

src/base/style/impl.tpp

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,20 @@ template <class T> T Sheet<T>::getFullParams() const
1515

1616
template <class T> ParamRegistry<T>::ParamRegistry()
1717
{
18-
Refl::visit<T>(
19-
[this]<class U,
20-
class = std::enable_if_t<
21-
std::is_constructible_v<Accessor, U>>>(U &&accessor,
22-
const std::initializer_list<std::string_view> &thePath =
23-
{})
24-
{
25-
std::string currentPath;
26-
for (auto sv : thePath) {
27-
if (!currentPath.empty()) currentPath += '.';
28-
currentPath += sv;
29-
}
18+
Refl::visit<T>([this]<class U,
19+
class =
20+
std::enable_if_t<std::is_constructible_v<Accessor, U>>>(
21+
U && accessor,
22+
const std::initializer_list<std::string_view> &thePath = {}) {
23+
std::string currentPath;
24+
for (auto sv : thePath) {
25+
if (!currentPath.empty()) currentPath += '.';
26+
currentPath += sv;
27+
}
3028

31-
accessors.try_emplace(std::move(currentPath),
32-
std::forward<U>(accessor));
33-
});
29+
accessors.try_emplace(std::move(currentPath),
30+
std::forward<U>(accessor));
31+
});
3432
}
3533
}
3634

src/chart/generator/buckets.cpp

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,15 @@ Buckets::const_iterator &Buckets::const_iterator::operator++()
4040
curr_end == real_end
4141
? curr_end
4242
: std::partition_point(curr_end,
43-
real_end,
44-
[this,
45-
searched = (*curr_end->*parent->marker_id_get)
46-
.seriesId](Marker *lhs) -> bool
47-
{
48-
return (lhs->*parent->marker_id_get).seriesId
49-
== searched;
50-
})};
43+
real_end,
44+
[this,
45+
searched =
46+
(*curr_end->*parent->marker_id_get).seriesId](
47+
Marker *lhs) -> bool
48+
{
49+
return (lhs->*parent->marker_id_get).seriesId
50+
== searched;
51+
})};
5152
return *this;
5253
}
5354

src/chart/main/chart.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ void Chart::draw(Gfx::ICanvas &canvas)
9191
{
9292
renderedChart = Draw::RenderedChart{
9393
actPlot ? Draw::CoordinateSystem{layout.plotArea,
94-
actPlot->getOptions()->angle,
95-
actPlot->getOptions()->coordSystem,
96-
actPlot->keepAspectRatio}
94+
actPlot->getOptions()->angle,
95+
actPlot->getOptions()->coordSystem,
96+
actPlot->keepAspectRatio}
9797
: Draw::CoordinateSystem{layout.plotArea},
9898
actPlot};
9999

src/chart/rendering/drawaxes.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -212,13 +212,12 @@ void DrawAxes::drawTitle(Gen::ChannelId axisIndex) const
212212
.value
213213
== Styles::AxisTitle::Orientation::vertical
214214
: titleStyle.orientation->factor<double>(
215-
Styles::AxisTitle::Orientation::vertical));
215+
Styles::AxisTitle::Orientation::vertical));
216216

217217
auto orientedSize =
218218
fades == ::Anim::second
219219
? calcOrientation(
220-
titleStyle.orientation->get_or_first(index)
221-
.value)
220+
titleStyle.orientation->get_or_first(index).value)
222221
: titleStyle.orientation->combine(calcOrientation);
223222

224223
auto center = offset * (orientedSize / 2.0);
@@ -321,7 +320,7 @@ void DrawAxes::drawDimensionLabel(bool horizontal,
321320
? labelStyle.side->get_or_first(index).value
322321
== Styles::AxisLabel::Side::negative
323322
: labelStyle.side->factor<double>(
324-
Styles::AxisLabel::Side::negative);
323+
Styles::AxisLabel::Side::negative);
325324

326325
auto sign = 1 - 2 * under;
327326

src/chart/rendering/drawinterlacing.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,9 @@ void DrawInterlacing::draw(
124124

125125
auto axisBottom = axis.origo() + stripWidth;
126126

127-
auto iMin = axisBottom > 0
128-
? static_cast<int>(std::floor(
129-
-axis.origo() / (2 * stripWidth)))
130-
: 0;
127+
auto iMin = axisBottom > 0 ? static_cast<int>(
128+
std::floor(-axis.origo() / (2 * stripWidth)))
129+
: 0;
131130

132131
if (stripWidth <= 0) return;
133132
auto interlaceCount = 0U;
@@ -257,7 +256,7 @@ void DrawInterlacing::drawDataLabel(
257256
? labelStyle.side->get_or_first(index).value
258257
== Styles::AxisLabel::Side::negative
259258
: labelStyle.side->factor<double>(
260-
Styles::AxisLabel::Side::negative);
259+
Styles::AxisLabel::Side::negative);
261260

262261
auto &&posDir =
263262
coordSys.convertDirectionAt({refPos, refPos + normal})

0 commit comments

Comments
 (0)