Fix cases where Get() isn't used
This commit is contained in:
parent
f2f22184b0
commit
1ae22f45f9
|
@ -13,8 +13,12 @@ namespace Pinetime {
|
||||||
DirtyValue() = default; // Use NSDMI
|
DirtyValue() = default; // Use NSDMI
|
||||||
explicit DirtyValue(T const& v) : value {v} {
|
explicit DirtyValue(T const& v) : value {v} {
|
||||||
} // Use MIL and const-lvalue-ref
|
} // Use MIL and const-lvalue-ref
|
||||||
bool IsUpdated() const {
|
bool IsUpdated() {
|
||||||
return isUpdated;
|
if (this->isUpdated) {
|
||||||
|
this->isUpdated = false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
T const& Get() {
|
T const& Get() {
|
||||||
this->isUpdated = false;
|
this->isUpdated = false;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user