File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 9
9
#include < rapidjson/encodedstream.h>
10
10
#include < rapidjson/writer.h>
11
11
#include < cassert>
12
+ #include < boost/lexical_cast.hpp>
12
13
13
14
#define kBIN_PLACE_HOLDER " _placeholder"
14
15
@@ -259,7 +260,7 @@ namespace sio
259
260
pos++;
260
261
if (_type == type_binary_event || _type == type_binary_ack) {
261
262
size_t score_pos = payload_ptr.find (' -' );
262
- _pending_buffers = stoi (payload_ptr.substr (pos,score_pos));
263
+ _pending_buffers = boost::lexical_cast< unsigned > (payload_ptr.substr (pos,score_pos));
263
264
pos = score_pos+1 ;
264
265
}
265
266
}
@@ -299,7 +300,7 @@ namespace sio
299
300
300
301
if (pos<json_pos)// we've got pack id.
301
302
{
302
- _pack_id = stoi (payload_ptr.substr (pos,json_pos - pos));
303
+ _pack_id = boost::lexical_cast< int > (payload_ptr.substr (pos,json_pos - pos));
303
304
}
304
305
if (_frame == frame_message && (_type == type_binary_event || _type == type_binary_ack)) {
305
306
// parse later when all buffers are arrived.
You can’t perform that action at this time.
0 commit comments