X-Git-Url: http://git.localhorst.tv/?p=blobs.git;a=blobdiff_plain;f=src%2Fworld%2FSet.hpp;h=ce832ac06d9cadbe65bc29204db617c3ab46af28;hp=af4d8a242959c166b95af639c6413bf8a81ff908;hb=b6e259a227889cc8af26f599bf3b76b6abb6bbd4;hpb=348143f5e41a5692ed7c8deab200f3c62f4395a2 diff --git a/src/world/Set.hpp b/src/world/Set.hpp index af4d8a2..ce832ac 100644 --- a/src/world/Set.hpp +++ b/src/world/Set.hpp @@ -25,6 +25,8 @@ public: bool Has(int id) const noexcept { return id < types.size(); } bool Has(const std::string &name) const noexcept { return names.find(name) != names.end(); } + typename std::vector::size_type Size() const noexcept { return types.size(); } + Type &operator [](int id) noexcept { return types[id]; } const Type &operator [](int id) const noexcept { return types[id]; }