Changeset 7f1be01
- Timestamp:
- Jul 4, 2023, 2:54:31 PM (2 years ago)
- Branches:
- master
- Children:
- 4c2e561
- Parents:
- b2ecd48
- Location:
- src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Common/ScopedMap.h
rb2ecd48 r7f1be01 199 199 friend class ScopedMap; 200 200 friend class const_iterator; 201 typedef typename ScopedMap::MapType::iterator wrapped_iterator; 202 typedef typename ScopedMap::ScopeList scope_list; 203 typedef typename scope_list::size_type size_type; 201 typedef typename MapType::iterator wrapped_iterator; 202 typedef typename ScopeList::size_type size_type; 204 203 205 204 /// Checks if this iterator points to a valid item … … 220 219 } 221 220 222 iterator( scope_list & _scopes, const wrapped_iterator & _it, size_type inLevel)221 iterator(ScopeList & _scopes, const wrapped_iterator & _it, size_type inLevel) 223 222 : scopes(&_scopes), it(_it), level(inLevel) {} 224 223 public: … … 266 265 267 266 private: 268 scope_list *scopes;267 ScopeList *scopes; 269 268 wrapped_iterator it; 270 269 size_type level; -
src/GenPoly/ErasableScopedMap.h
rb2ecd48 r7f1be01 57 57 /// Starts a new scope 58 58 void beginScope() { 59 Scope scope; 60 scopes.push_back(scope); 59 scopes.emplace_back(); 61 60 } 62 61 … … 145 144 public std::iterator< std::bidirectional_iterator_tag, value_type > { 146 145 friend class ErasableScopedMap; 147 typedef typename std::map< Key, Value >::iterator wrapped_iterator; 148 typedef typename std::vector< std::map< Key, Value > > scope_list; 149 typedef typename scope_list::size_type size_type; 146 typedef typename Scope::iterator wrapped_iterator; 147 typedef typename ScopeList::size_type size_type; 150 148 151 149 /// Checks if this iterator points to a valid item -
src/GenPoly/ScopedSet.h
rb2ecd48 r7f1be01 47 47 /// Starts a new scope 48 48 void beginScope() { 49 Scope scope; 50 scopes.push_back(scope); 49 scopes.emplace_back(); 51 50 } 52 51 … … 85 84 iterator findNext( const_iterator &it, const Value &key ) { 86 85 if ( it.i == 0 ) return end(); 87 86 for ( size_type i = it.i - 1; ; --i ) { 88 87 typename Scope::iterator val = scopes[i].find( key ); 89 88 if ( val != scopes[i].end() ) return iterator( scopes, val, i ); … … 112 111 friend class ScopedSet; 113 112 friend class const_iterator; 114 typedef typename std::set< Value >::iterator wrapped_iterator; 115 typedef typename std::vector< std::set< Value > > scope_list; 116 typedef typename scope_list::size_type size_type; 113 typedef typename Scope::iterator wrapped_iterator; 114 typedef typename ScopeList::size_type size_type; 117 115 118 116 /// Checks if this iterator points to a valid item … … 133 131 } 134 132 135 iterator( scope_list const &_scopes, const wrapped_iterator &_it, size_type _i)133 iterator(ScopeList const &_scopes, const wrapped_iterator &_it, size_type _i) 136 134 : scopes(&_scopes), it(_it), i(_i) {} 137 135 public: … … 176 174 177 175 private: 178 scope_list const *scopes;176 ScopeList const *scopes; 179 177 wrapped_iterator it; 180 178 size_type i; … … 185 183 public std::iterator< std::bidirectional_iterator_tag, value_type > { 186 184 friend class ScopedSet; 187 typedef typename std::set< Value >::iterator wrapped_iterator; 188 typedef typename std::set< Value >::const_iterator wrapped_const_iterator; 189 typedef typename std::vector< std::set< Value > > scope_list; 190 typedef typename scope_list::size_type size_type; 185 typedef typename Scope::iterator wrapped_iterator; 186 typedef typename Scope::const_iterator wrapped_const_iterator; 187 typedef typename ScopeList::size_type size_type; 191 188 192 189 /// Checks if this iterator points to a valid item … … 207 204 } 208 205 209 const_iterator( scope_list const &_scopes, const wrapped_const_iterator &_it, size_type _i)206 const_iterator(ScopeList const &_scopes, const wrapped_const_iterator &_it, size_type _i) 210 207 : scopes(&_scopes), it(_it), i(_i) {} 211 208 public: … … 255 252 256 253 private: 257 scope_list const *scopes;254 ScopeList const *scopes; 258 255 wrapped_const_iterator it; 259 256 size_type i;
Note:
See TracChangeset
for help on using the changeset viewer.