diff --git a/DictIteratorBase.mqh b/DictIteratorBase.mqh index 329fc5cb8..8d11899fa 100644 --- a/DictIteratorBase.mqh +++ b/DictIteratorBase.mqh @@ -121,7 +121,7 @@ class DictIteratorBase { bool IsLast() { if (!IsValid()) return true; - if (_dict PTR_DEREF GetMode() == DictModeUnknown || _dict.Size() == 0) { + if (_dict PTR_DEREF GetMode() == DictModeUnknown || _dict PTR_DEREF Size() == 0) { return false; } diff --git a/DictStruct.mqh b/DictStruct.mqh index 405dcee7a..b545cecf8 100644 --- a/DictStruct.mqh +++ b/DictStruct.mqh @@ -144,14 +144,14 @@ class DictStruct : public DictBase { else slot = GetSlotByKey(_DictSlots_ref, key, position); - if (slot == NULL || !slot.IsUsed()) { + if (slot == NULL || !slot PTR_DEREF IsUsed()) { Alert("Invalid DictStruct key \"", key, "\" (called by [] operator). Returning empty structure."); DebugBreak(); static V _empty; return _empty; } - return slot.value; + return slot PTR_DEREF value; } /** @@ -166,7 +166,7 @@ class DictStruct : public DictBase { return _empty; } - return slot.value; + return slot PTR_DEREF value; } /** @@ -183,7 +183,7 @@ class DictStruct : public DictBase { return _default; } - return slot.value; + return slot PTR_DEREF value; } /** @@ -199,7 +199,7 @@ class DictStruct : public DictBase { return _empty; } - return slot.value; + return slot PTR_DEREF value; } /** @@ -231,7 +231,7 @@ class DictStruct : public DictBase { if (!slot) return false; - return slot.value == value; + return slot PTR_DEREF value == value; } /** diff --git a/Task/Task.h b/Task/Task.h index 4c5863a32..b6a98a083 100644 --- a/Task/Task.h +++ b/Task/Task.h @@ -186,19 +186,16 @@ class Task { unsigned int _counter = 0; for (DictStructIterator iter = tasks.Begin(); iter.IsValid(); ++iter) { TaskEntry _entry = iter.Value(); - switch (_value) { - case false: - if (_entry.HasFlag(_flag)) { - _entry.SetFlag(_flag, _value); - _counter++; - } - break; - case true: - if (!_entry.HasFlag(_flag)) { - _entry.SetFlag(_flag, _value); - _counter++; - } - break; + if (!_value) { + if (_entry.HasFlag(_flag)) { + _entry.SetFlag(_flag, _value); + _counter++; + } + } else { + if (!_entry.HasFlag(_flag)) { + _entry.SetFlag(_flag, _value); + _counter++; + } } } return _counter > 0;