Changeset c36a419 for src/AST/Decl.cpp
- Timestamp:
- Nov 21, 2023, 2:27:10 PM (7 months ago)
- Branches:
- master
- Children:
- 8984003
- Parents:
- 4883712
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Decl.cpp
r4883712 rc36a419 33 33 static UniqueId lastUniqueId = 0; 34 34 35 using IdMapType = std::unordered_map< UniqueId, readonly<Decl> >;36 static IdMapType idMap;37 38 35 void Decl::fixUniqueId() { 39 36 if ( uniqueId ) return; // ensure only set once 40 37 uniqueId = ++lastUniqueId; 41 // The extra readonly pointer is causing some reference counting issues.42 // idMap[ uniqueId ] = this;43 }44 45 readonly<Decl> Decl::fromId( UniqueId id ) {46 // Right now this map is always empty, so don't use it.47 assert( false );48 IdMapType::const_iterator i = idMap.find( id );49 if ( i != idMap.end() ) return i->second;50 return {};51 38 } 52 39
Note: See TracChangeset
for help on using the changeset viewer.