X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fworld%2FSet.hpp;h=af4d8a242959c166b95af639c6413bf8a81ff908;hb=bcf776b6d51aeb9147bde32da8dd0768b10db993;hp=c4aa6e9f37b6691b38385884e258810913e2dadc;hpb=7ae2bd120fd0e1800edc9cbeb61e72bd06ffcf10;p=blobs.git diff --git a/src/world/Set.hpp b/src/world/Set.hpp index c4aa6e9..af4d8a2 100644 --- a/src/world/Set.hpp +++ b/src/world/Set.hpp @@ -22,6 +22,8 @@ public: types.back().id = id; return id; } + bool Has(int id) const noexcept { return id < types.size(); } + bool Has(const std::string &name) const noexcept { return names.find(name) != names.end(); } Type &operator [](int id) noexcept { return types[id]; } const Type &operator [](int id) const noexcept { return types[id]; }