Mark comparators const.

This commit is contained in:
Bartosz Taudul 2024-09-26 14:04:20 +02:00
parent 5b1f3f67c3
commit 717605065a
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3
2 changed files with 5 additions and 5 deletions

View File

@ -179,7 +179,7 @@ private:
uint8_t m_val[6]; uint8_t m_val[6];
}; };
struct Int48Sort { bool operator()( const Int48& lhs, const Int48& rhs ) { return lhs.Val() < rhs.Val(); }; }; struct Int48Sort { bool operator()( const Int48& lhs, const Int48& rhs ) const { return lhs.Val() < rhs.Val(); }; };
struct SourceLocationBase struct SourceLocationBase
@ -264,7 +264,7 @@ struct SampleData
enum { SampleDataSize = sizeof( SampleData ) }; enum { SampleDataSize = sizeof( SampleData ) };
struct SampleDataSort { bool operator()( const SampleData& lhs, const SampleData& rhs ) { return lhs.time.Val() < rhs.time.Val(); }; }; struct SampleDataSort { bool operator()( const SampleData& lhs, const SampleData& rhs ) const { return lhs.time.Val() < rhs.time.Val(); }; };
struct SampleDataRange struct SampleDataRange
@ -742,7 +742,7 @@ enum class PlotValueFormatting : uint8_t
struct PlotData struct PlotData
{ {
struct PlotItemSort { bool operator()( const PlotItem& lhs, const PlotItem& rhs ) { return lhs.time.Val() < rhs.time.Val(); }; }; struct PlotItemSort { bool operator()( const PlotItem& lhs, const PlotItem& rhs ) const { return lhs.time.Val() < rhs.time.Val(); }; };
uint64_t name; uint64_t name;
double min; double min;

View File

@ -198,7 +198,7 @@ public:
private: private:
struct SourceLocationZones struct SourceLocationZones
{ {
struct ZtdSort { bool operator()( const ZoneThreadData& lhs, const ZoneThreadData& rhs ) { return lhs.Zone()->Start() < rhs.Zone()->Start(); } }; struct ZtdSort { bool operator()( const ZoneThreadData& lhs, const ZoneThreadData& rhs ) const { return lhs.Zone()->Start() < rhs.Zone()->Start(); } };
SortedVector<ZoneThreadData, ZtdSort> zones; SortedVector<ZoneThreadData, ZtdSort> zones;
int64_t min = std::numeric_limits<int64_t>::max(); int64_t min = std::numeric_limits<int64_t>::max();
@ -217,7 +217,7 @@ private:
struct GpuSourceLocationZones struct GpuSourceLocationZones
{ {
struct GpuZtdSort { bool operator()( const GpuZoneThreadData& lhs, const GpuZoneThreadData& rhs ) { return lhs.Zone()->GpuStart() < rhs.Zone()->GpuStart(); } }; struct GpuZtdSort { bool operator()( const GpuZoneThreadData& lhs, const GpuZoneThreadData& rhs ) const { return lhs.Zone()->GpuStart() < rhs.Zone()->GpuStart(); } };
SortedVector<GpuZoneThreadData, GpuZtdSort> zones; SortedVector<GpuZoneThreadData, GpuZtdSort> zones;
int64_t min = std::numeric_limits<int64_t>::max(); int64_t min = std::numeric_limits<int64_t>::max();