added isSorted method to signalvector

This commit is contained in:
fourtf 2018-07-03 15:06:23 +02:00
parent e757a6504b
commit 836f931b23

View file

@ -50,6 +50,8 @@ public:
}
}
virtual bool isSorted() const = 0;
protected:
std::vector<TVectorItem> vector;
QTimer itemsChangedTimer;
@ -101,6 +103,11 @@ public:
this->invokeDelayedItemsChanged();
return index;
}
virtual bool isSorted() const override
{
return false;
}
};
template <typename TVectorItem, typename Compare>
@ -120,6 +127,11 @@ public:
this->invokeDelayedItemsChanged();
return index;
}
virtual bool isSorted() const override
{
return true;
}
};
} // namespace chatterino