diff --git a/src/sio_message.h b/src/sio_message.h index 2801699a..26e7115c 100644 --- a/src/sio_message.h +++ b/src/sio_message.h @@ -143,7 +143,7 @@ namespace sio return ptr(new bool_message(v)); } - bool get_bool() const + bool get_bool() const override { return _v; } @@ -164,14 +164,14 @@ namespace sio return ptr(new int_message(v)); } - int64_t get_int() const + int64_t get_int() const override { return _v; } - double get_double() const//add double accessor for integer. + double get_double() const override { - return static_cast(_v); + return static_cast(_v);//add double accessor for integer. } }; @@ -189,7 +189,7 @@ namespace sio return ptr(new double_message(v)); } - double get_double() const + double get_double() const override { return _v; } @@ -218,7 +218,7 @@ namespace sio return ptr(new string_message(std::move(v))); } - std::string const& get_string() const + std::string const& get_string() const override { return _v; } @@ -237,7 +237,7 @@ namespace sio return ptr(new binary_message(v)); } - std::shared_ptr const& get_binary() const + std::shared_ptr const& get_binary() const override { return _v; } @@ -256,10 +256,10 @@ namespace sio return ptr(new array_message()); } - void push(message::ptr const& message) + void push(message::ptr const& msg) { - if(message) - _v.push_back(message); + if(msg) + _v.push_back(msg); } void push(const std::string& text) @@ -284,9 +284,9 @@ namespace sio _v.push_back(binary_message::create(binary)); } - void insert(size_t pos,message::ptr const& message) + void insert(size_t pos,message::ptr const& msg) { - _v.insert(_v.begin()+pos, message); + _v.insert(_v.begin()+pos, msg); } void insert(size_t pos,const std::string& text) @@ -326,12 +326,12 @@ namespace sio return _v[i]; } - std::vector& get_vector() + std::vector& get_vector() override { return _v; } - const std::vector& get_vector() const + const std::vector& get_vector() const override { return _v; } @@ -349,9 +349,9 @@ namespace sio return ptr(new object_message()); } - void insert(const std::string & key,message::ptr const& message) + void insert(const std::string & key,message::ptr const& msg) { - _v[key] = message; + _v[key] = msg; } void insert(const std::string & key,const std::string& text) @@ -400,12 +400,12 @@ namespace sio return _v.find(key) != _v.end(); } - std::map& get_map() + std::map& get_map() override { return _v; } - const std::map& get_map() const + const std::map& get_map() const override { return _v; } @@ -447,11 +447,10 @@ namespace sio } - list(message::ptr const& message) + list(message::ptr const& msg) { - if(message) - m_vector.push_back(message); - + if(msg) + m_vector.push_back(msg); } list(const std::string& text) @@ -476,10 +475,10 @@ namespace sio m_vector.push_back(binary_message::create(binary)); } - void push(message::ptr const& message) + void push(message::ptr const& msg) { - if(message) - m_vector.push_back(message); + if(msg) + m_vector.push_back(msg); } void push(const std::string& text) @@ -504,9 +503,9 @@ namespace sio m_vector.push_back(binary_message::create(binary)); } - void insert(size_t pos,message::ptr const& message) + void insert(size_t pos,message::ptr const& msg) { - m_vector.insert(m_vector.begin()+pos, message); + m_vector.insert(m_vector.begin()+pos, msg); } void insert(size_t pos,const std::string& text)