diff options
| author | Adam <Adam@anope.org> | 2016-10-09 11:58:58 -0400 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2016-10-09 11:58:58 -0400 |
| commit | cffbf4e8fd93ae28f1c6d6fde221e72d70015942 (patch) | |
| tree | eac6b9d8e95b660ac31bcebbd3f84b16b21421c9 | |
| parent | caf3a43dad168dad5e7f01c704ceab436573e2f4 (diff) | |
Don't return a reference from the stack in TypeBase::GetTypes
| -rw-r--r-- | include/serialize.h | 2 | ||||
| -rw-r--r-- | src/serialize.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/include/serialize.h b/include/serialize.h index 73964e3b7..1d0fb9400 100644 --- a/include/serialize.h +++ b/include/serialize.h @@ -279,7 +279,7 @@ class CoreExport Serialize::TypeBase : public Service static TypeBase *Find(const Anope::string &name); - static const std::vector<TypeBase *>& GetTypes(); + static std::vector<TypeBase *> GetTypes(); }; template<typename T, typename Base = Serialize::TypeBase> diff --git a/src/serialize.cpp b/src/serialize.cpp index 1cf9bcb58..20c05e502 100644 --- a/src/serialize.cpp +++ b/src/serialize.cpp @@ -255,7 +255,7 @@ TypeBase *TypeBase::Find(const Anope::string &name) return ServiceManager::Get()->FindService<TypeBase *>(name); } -const std::vector<TypeBase *>& TypeBase::GetTypes() +std::vector<TypeBase *> TypeBase::GetTypes() { return ServiceManager::Get()->FindServices<TypeBase *>(); } |
