Address clang-tidy warnings

This commit is contained in:
Raúl Marín 2022-03-18 11:15:12 +01:00
parent 3191032c99
commit fe42895745

View File

@ -42,7 +42,6 @@ void callWithType(TypeIndex type, F && f)
template <typename TKey, ASOF::Inequality inequality> template <typename TKey, ASOF::Inequality inequality>
class SortedLookupVector : public SortedLookupVectorBase class SortedLookupVector : public SortedLookupVectorBase
{ {
public:
struct Entry struct Entry
{ {
/// We don't store a RowRef and instead keep it's members separately (and return a tuple) to reduce the memory usage. /// We don't store a RowRef and instead keep it's members separately (and return a tuple) to reduce the memory usage.
@ -57,7 +56,7 @@ public:
bool operator<(const Entry & other) const { return asof_value < other.asof_value; } bool operator<(const Entry & other) const { return asof_value < other.asof_value; }
}; };
struct greaterEntryOperator struct GreaterEntryOperator
{ {
bool operator()(Entry const & a, Entry const & b) const { return a.asof_value > b.asof_value; } bool operator()(Entry const & a, Entry const & b) const { return a.asof_value > b.asof_value; }
}; };
@ -164,7 +163,7 @@ private:
if (!sorted.load(std::memory_order_relaxed)) if (!sorted.load(std::memory_order_relaxed))
{ {
if constexpr (isDescending) if constexpr (isDescending)
::sort(array.begin(), array.end(), greaterEntryOperator()); ::sort(array.begin(), array.end(), GreaterEntryOperator());
else else
::sort(array.begin(), array.end()); ::sort(array.begin(), array.end());
sorted.store(true, std::memory_order_release); sorted.store(true, std::memory_order_release);