Skip to content

Commit 64074bc

Browse files
committed
klee/ADT: fixed c++20 warnings
Signed-off-by: Vitaly Chipounov <vitaly@chipounov.fr>
1 parent 3334b5e commit 64074bc

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

klee/include/klee/Internal/ADT/ImmutableSet.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ template <class T, class CMP = std::less<T>> class ImmutableSet {
6666
const value_type &max() const {
6767
return elts.max();
6868
}
69-
size_t size() {
69+
size_t size() const {
7070
return elts.size();
7171
}
7272

klee/include/klee/Internal/ADT/ImmutableTree.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ template <typename T> class FixedStack {
119119
void pop_back() {
120120
--pos;
121121
}
122-
bool empty() {
122+
bool empty() const {
123123
return pos == 0;
124124
}
125125
T &back() {
@@ -133,10 +133,10 @@ template <typename T> class FixedStack {
133133
return *this;
134134
}
135135

136-
bool operator==(const FixedStack &b) {
136+
bool operator==(const FixedStack &b) const {
137137
return (pos == b.pos && std::equal(elts, elts + pos, b.elts));
138138
}
139-
bool operator!=(const FixedStack &b) {
139+
bool operator!=(const FixedStack &b) const {
140140
return !(*this == b);
141141
}
142142
};
@@ -179,10 +179,10 @@ template <class K, class V, class KOV, class CMP> class ImmutableTree<K, V, KOV,
179179
return &n->value;
180180
}
181181

182-
bool operator==(const iterator &b) {
182+
bool operator==(const iterator &b) const {
183183
return stack == b.stack;
184184
}
185-
bool operator!=(const iterator &b) {
185+
bool operator!=(const iterator &b) const {
186186
return stack != b.stack;
187187
}
188188

0 commit comments

Comments
 (0)