mirror of
https://github.com/edubart/otclient.git
synced 2025-10-17 04:53:27 +02:00
Minor fix in std::packed_any
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user