mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-10-14 15:05:37 +02:00
Fixed #399
If MSGPACK_DISABLE_LEGACY_CONVERT is defined, msgpack::object::convert(T*) is removed. Added MSGPACK_DISABLE_LEGACY_CONVERT to build system and documents. Please define MSGPACK_DISABLE_LEGACY_CONVERT and update your code as follows: Replace int i; obj.convert(&i); // Removed pointer version with int i; obj.convert(i); // Reference version
This commit is contained in:
@@ -149,13 +149,13 @@ public:
|
||||
void msgpack_unpack(msgpack::object o)
|
||||
{
|
||||
msgpack::type::tuple<bool, msgpack::object> tuple;
|
||||
o.convert(&tuple);
|
||||
o.convert(tuple);
|
||||
|
||||
is_double = tuple.get<0>();
|
||||
if (is_double)
|
||||
tuple.get<1>().convert(&value.f);
|
||||
tuple.get<1>().convert(value.f);
|
||||
else
|
||||
tuple.get<1>().convert(&value.i);
|
||||
tuple.get<1>().convert(value.i);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user