mirror of https://github.com/procxx/kepka.git
remove function updated
This commit is contained in:
parent
a96e15cd51
commit
0e41fbf5e4
|
@ -46,19 +46,19 @@ public:
|
||||||
void set(FlagsType which) {
|
void set(FlagsType which) {
|
||||||
if (auto diff = which ^ _value) {
|
if (auto diff = which ^ _value) {
|
||||||
_value = which;
|
_value = which;
|
||||||
updated(diff);
|
//updated(diff);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void add(FlagsType which) {
|
void add(FlagsType which) {
|
||||||
if (auto diff = which & ~_value) {
|
if (auto diff = which & ~_value) {
|
||||||
_value |= which;
|
_value |= which;
|
||||||
updated(diff);
|
//updated(diff);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void remove(FlagsType which) {
|
void remove(FlagsType which) {
|
||||||
if (auto diff = which & _value) {
|
if (auto diff = which & _value) {
|
||||||
_value &= ~which;
|
_value &= ~which;
|
||||||
updated(diff);
|
//updated(diff);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FlagsType current() const {
|
FlagsType current() const {
|
||||||
|
@ -74,11 +74,11 @@ public:
|
||||||
// }
|
// }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void updated(FlagsType diff) {
|
// void updated(FlagsType diff) {
|
||||||
if ((diff &= FlagsType::from_raw(kEssential))) {
|
// if ((diff &= FlagsType::from_raw(kEssential))) {
|
||||||
_changes.fire({ diff, _value });
|
// _changes.fire({ diff, _value });
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
FlagsType _value = 0;
|
FlagsType _value = 0;
|
||||||
//rpl::event_stream<Change> _changes;
|
//rpl::event_stream<Change> _changes;
|
||||||
|
|
Loading…
Reference in New Issue