Fix cases where Get() isn't used

This commit is contained in:
Riku Isokoski 2021-07-13 21:09:04 +03:00 committed by JF002
parent f2f22184b0
commit 1ae22f45f9

View file

@ -13,8 +13,12 @@ namespace Pinetime {
DirtyValue() = default; // Use NSDMI
explicit DirtyValue(T const& v) : value {v} {
} // Use MIL and const-lvalue-ref
bool IsUpdated() const {
return isUpdated;
bool IsUpdated() {
if (this->isUpdated) {
this->isUpdated = false;
return true;
}
return false;
}
T const& Get() {
this->isUpdated = false;