Minor fix in std::packed_any
This commit is contained in:
parent
57785d2001
commit
ee4f155b92
|
@ -81,7 +81,7 @@ public:
|
|||
bool empty() const { return !scalar && !content; }
|
||||
template<typename T> 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);
|
||||
|
|
|
@ -44,7 +44,7 @@ public:
|
|||
~packed_storage() { if(m_values) delete[] m_values; }
|
||||
|
||||
template<typename T>
|
||||
void set(Key id, T value) {
|
||||
void set(Key id, const T& value) {
|
||||
for(SizeType i=0;i<m_size;++i) {
|
||||
if(m_values[i].id == id) {
|
||||
m_values[i].value = value;
|
||||
|
|
|
@ -207,8 +207,10 @@ void Map::loadOtbm(const std::string& fileName)
|
|||
g_logger.debug("OTBM read successfully.");
|
||||
fin->close();
|
||||
|
||||
/*
|
||||
loadSpawns(getSpawnFile());
|
||||
m_houses.load(getHouseFile());
|
||||
*/
|
||||
}
|
||||
|
||||
void Map::saveOtbm(const std::string &fileName)
|
||||
|
|
Loading…
Reference in New Issue