mirror of
https://github.com/YosysHQ/yosys.git
synced 2026-08-22 14:17:27 +02:00
dict: Remove guard for past-the-end iterators that might mask problems in static analysis.
Co-Authored-By: whitequark <[email protected]>
This commit is contained in:
co-authored by
whitequark
parent
e5a2d17b5d
commit
d71a9badda
+2
-2
@@ -363,7 +363,7 @@ public:
|
||||
public:
|
||||
const_iterator() { }
|
||||
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; }
|
||||
@@ -381,7 +381,7 @@ public:
|
||||
public:
|
||||
iterator() { }
|
||||
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; }
|
||||
|
||||
Reference in New Issue
Block a user