mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-22 23:39:24 +00:00
Add const to some member functions of SuccIterator.
The operator+() and operator-() do not change the member variables of SuccIterator. This CL will qualify the *this* pointer with const. llvm-svn: 201933
This commit is contained in:
parent
2af1a44892
commit
496636ca6c
@ -208,7 +208,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline Self operator+(int Right) {
|
||||
inline Self operator+(int Right) const {
|
||||
Self tmp = *this;
|
||||
tmp += Right;
|
||||
return tmp;
|
||||
@ -218,11 +218,11 @@ public:
|
||||
return operator+=(-Right);
|
||||
}
|
||||
|
||||
inline Self operator-(int Right) {
|
||||
inline Self operator-(int Right) const {
|
||||
return operator+(-Right);
|
||||
}
|
||||
|
||||
inline int operator-(const Self& x) {
|
||||
inline int operator-(const Self& x) const {
|
||||
assert(Term == x.Term && "Cannot work on iterators of different blocks!");
|
||||
int distance = idx - x.idx;
|
||||
return distance;
|
||||
|
Loading…
Reference in New Issue
Block a user