Skip to content

Commit 1ae22f4

Browse files
Riksu9000JF002
authored andcommitted
Fix cases where Get() isn't used
1 parent f2f2218 commit 1ae22f4

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/displayapp/screens/Screen.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,12 @@ namespace Pinetime {
1313
DirtyValue() = default; // Use NSDMI
1414
explicit DirtyValue(T const& v) : value {v} {
1515
} // Use MIL and const-lvalue-ref
16-
bool IsUpdated() const {
17-
return isUpdated;
16+
bool IsUpdated() {
17+
if (this->isUpdated) {
18+
this->isUpdated = false;
19+
return true;
20+
}
21+
return false;
1822
}
1923
T const& Get() {
2024
this->isUpdated = false;

0 commit comments

Comments
 (0)