From ee4f155b920811321d3f810d7cd4d8fe79b72f2e Mon Sep 17 00:00:00 2001 From: Eduardo Bart Date: Thu, 2 Aug 2012 06:27:16 -0300 Subject: [PATCH] Minor fix in std::packed_any --- src/framework/stdext/packed_any.h | 2 +- src/framework/stdext/packed_storage.h | 2 +- src/otclient/mapio.cpp | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/framework/stdext/packed_any.h b/src/framework/stdext/packed_any.h index dc4e2249..24748bd5 100644 --- a/src/framework/stdext/packed_any.h +++ b/src/framework/stdext/packed_any.h @@ -81,7 +81,7 @@ public: bool empty() const { return !scalar && !content; } template T cast() const; const std::type_info& type() const { - if(scalar) + if(!scalar) return content ? content->type() : typeid(void); else return typeid(std::size_t); diff --git a/src/framework/stdext/packed_storage.h b/src/framework/stdext/packed_storage.h index 840ca2ee..ef5e28b8 100644 --- a/src/framework/stdext/packed_storage.h +++ b/src/framework/stdext/packed_storage.h @@ -44,7 +44,7 @@ public: ~packed_storage() { if(m_values) delete[] m_values; } template - void set(Key id, T value) { + void set(Key id, const T& value) { for(SizeType i=0;iclose(); + /* loadSpawns(getSpawnFile()); m_houses.load(getHouseFile()); + */ } void Map::saveOtbm(const std::string &fileName)