mirror of https://github.com/YosysHQ/yosys.git
dict: Remove guard for past-the-end iterators that might mask problems in static analysis.
Co-Authored-By: whitequark <whitequark@whitequark.org>
This commit is contained in:
parent
e5a2d17b5d
commit
d71a9badda
|
@ -363,7 +363,7 @@ public:
|
||||||
public:
|
public:
|
||||||
const_iterator() { }
|
const_iterator() { }
|
||||||
const_iterator operator++() { index--; return *this; }
|
const_iterator operator++() { index--; return *this; }
|
||||||
const_iterator operator+=(int amt) { index -= amt; if(index < 0) index = -1; return *this; }
|
const_iterator operator+=(int amt) { index -= amt; return *this; }
|
||||||
bool operator<(const const_iterator &other) const { return index > other.index; }
|
bool operator<(const const_iterator &other) const { return index > other.index; }
|
||||||
bool operator==(const const_iterator &other) const { return index == other.index; }
|
bool operator==(const const_iterator &other) const { return index == other.index; }
|
||||||
bool operator!=(const const_iterator &other) const { return index != other.index; }
|
bool operator!=(const const_iterator &other) const { return index != other.index; }
|
||||||
|
@ -381,7 +381,7 @@ public:
|
||||||
public:
|
public:
|
||||||
iterator() { }
|
iterator() { }
|
||||||
iterator operator++() { index--; return *this; }
|
iterator operator++() { index--; return *this; }
|
||||||
iterator operator+=(int amt) { index -= amt; if(index < 0) index = -1; return *this; }
|
iterator operator+=(int amt) { index -= amt; return *this; }
|
||||||
bool operator<(const iterator &other) const { return index > other.index; }
|
bool operator<(const iterator &other) const { return index > other.index; }
|
||||||
bool operator==(const iterator &other) const { return index == other.index; }
|
bool operator==(const iterator &other) const { return index == other.index; }
|
||||||
bool operator!=(const iterator &other) const { return index != other.index; }
|
bool operator!=(const iterator &other) const { return index != other.index; }
|
||||||
|
|
Loading…
Reference in New Issue