Skip to content

Commit 9e9d76c

Browse files
committed
Merge pull request #24 from stefanhong/master
fix compatibility problem for gcc 4.8+.
2 parents d0e4805 + 52f92d8 commit 9e9d76c

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ cmake
3737
1. Install boost, see [Boost setup](#boost_setup) section.
3838
2. Use `git clone --recurse-submodules https://github.com/socketio/socket.io-client-cpp.git` to clone your local repo.
3939
3. Add `<your boost install folder>/include`,`./lib/websocketpp` and `./lib/rapidjson/include` to headers search path.
40-
4. Include all files under `./src` in your project, add `sio_packet.cpp`,`sio_socket.cpp`,`internal/sio_client_impl.cpp` to source list.
40+
4. Include all files under `./src` in your project, add `sio_client.cpp`,`sio_socket.cpp`,`internal/sio_client_impl.cpp`, `internal/sio_packet.cpp` to source list.
4141
5. Add `<your boost install folder>/lib` to library search path, add `boost.lib`(Win32) or `-lboost`(Other) link option.
4242
6. Include `sio_client.h` in your client code where you want to use it.
4343

src/internal/sio_packet.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ namespace sio
303303
}
304304
if (_frame == frame_message && (_type == type_binary_event || _type == type_binary_ack)) {
305305
//parse later when all buffers are arrived.
306-
_buffers.push_back(make_shared<const string>(payload_ptr.data() + json_pos, payload_ptr.length() - json_pos));
306+
_buffers.push_back(make_shared<string>(payload_ptr.data() + json_pos, payload_ptr.length() - json_pos));
307307
return true;
308308
}
309309
else

src/sio_message.h

+2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ namespace sio
2727
flag_array,
2828
flag_object
2929
};
30+
31+
virtual ~message() = default;
3032

3133
class list;
3234

0 commit comments

Comments
 (0)