summaryrefslogtreecommitdiff
path: root/src/powerlist.h
diff options
context:
space:
mode:
authorAndré Nusser <andre.nusser@googlemail.com>2019-03-08 01:21:24 +0100
committerAndré Nusser <andre.nusser@googlemail.com>2019-05-11 14:54:51 +0200
commitee41b02f78a81cb96365c56f7a8dd69d7f6e7d72 (patch)
tree917f888174cf129c21ce945b34f431c0cb5d5eb6 /src/powerlist.h
parentdcff4b6914d07c6dcff9cbbdc93dc0f4dc146d44 (diff)
Optimized version of new sample selection.
Diffstat (limited to 'src/powerlist.h')
-rw-r--r--src/powerlist.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/powerlist.h b/src/powerlist.h
index 000da15..ffbd6ba 100644
--- a/src/powerlist.h
+++ b/src/powerlist.h
@@ -34,6 +34,15 @@ struct PowerListItem
{
Sample* sample;
float power;
+
+ bool operator<(const PowerListItem& other) const
+ {
+ return power < other.power;
+ }
+ bool operator<(level_t power) const
+ {
+ return this->power < power;
+ }
};
using PowerListItems = std::vector<PowerListItem>;