diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2014-02-08 15:09:25 -0800 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2014-02-08 16:18:22 -0800 |
commit | 730e5dde39333cb2f63c72a7d7152bee5c4dbb05 (patch) | |
tree | 510ef3e0ad46ecf1f2bee1fa42f26e6377b51686 /src/common/intern-pool.hpp | |
parent | 7a15a3efe85837d52d950cc9f895eadcc9eb6be1 (diff) | |
download | tmwa-730e5dde39333cb2f63c72a7d7152bee5c4dbb05.tar.gz tmwa-730e5dde39333cb2f63c72a7d7152bee5c4dbb05.tar.bz2 tmwa-730e5dde39333cb2f63c72a7d7152bee5c4dbb05.tar.xz tmwa-730e5dde39333cb2f63c72a7d7152bee5c4dbb05.zip |
Implement AString
Diffstat (limited to 'src/common/intern-pool.hpp')
-rw-r--r-- | src/common/intern-pool.hpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/common/intern-pool.hpp b/src/common/intern-pool.hpp index 163e5cc..e75a359 100644 --- a/src/common/intern-pool.hpp +++ b/src/common/intern-pool.hpp @@ -6,18 +6,19 @@ # include <map> # include <vector> -# include "../strings/fstring.hpp" +# include "../strings/rstring.hpp" # include "../strings/zstring.hpp" # include "../strings/xstring.hpp" class InternPool { - std::map<FString, size_t> known; - std::vector<FString> names; + std::map<RString, size_t> known; + std::vector<RString> names; public: size_t intern(XString name_) { - FString name = name_; + // TODO just look up the XString, the memory should not move by now + RString name = name_; // hm, I could change this to do aliases auto pair = known.insert({name, known.size()}); if (pair.second) |