diff options
author | Svenn-Arne Dragly <s@dragly.com> | 2018-10-29 12:13:00 +0100 |
---|---|---|
committer | Andy Nichols <andy.nichols@qt.io> | 2018-11-09 09:00:12 +0000 |
commit | 620ff320780843dc9ba322367bef6236231f57f7 (patch) | |
tree | 2884fec342ffa2d26733175c4e78c6288d5e3bd2 | |
parent | d0cd8365ca753eb0b46df446fdc788fadf6ddb25 (diff) |
Make comparison operators of Mutable and Immutable const
Change-Id: Iedece863f679daacd99ee91193b719b96006dd0c
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
-rw-r--r-- | src/runtime/dragon/dragonimmutable_p.h | 4 | ||||
-rw-r--r-- | src/runtime/dragon/dragonmutable_p.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/runtime/dragon/dragonimmutable_p.h b/src/runtime/dragon/dragonimmutable_p.h index 2c481a7..3db2ef7 100644 --- a/src/runtime/dragon/dragonimmutable_p.h +++ b/src/runtime/dragon/dragonimmutable_p.h @@ -301,12 +301,12 @@ struct Immutable return std::make_shared<U>(*typed_container); } - bool operator==(const Immutable<T> &other) + bool operator==(const Immutable<T> &other) const { return *m_container == *other.m_container; } - bool operator!=(const Immutable<T> &other) + bool operator!=(const Immutable<T> &other) const { return *m_container != *other.m_container; } diff --git a/src/runtime/dragon/dragonmutable_p.h b/src/runtime/dragon/dragonmutable_p.h index af671e8..6d18b8c 100644 --- a/src/runtime/dragon/dragonmutable_p.h +++ b/src/runtime/dragon/dragonmutable_p.h @@ -151,12 +151,12 @@ struct Mutable return container.get(); } - bool operator==(const Mutable<T> &other) + bool operator==(const Mutable<T> &other) const { return *container == *other.container; } - bool operator!=(const Mutable<T> &other) + bool operator!=(const Mutable<T> &other) const { return *container != *other.container; } |