|
27 | 27 |
|
28 | 28 | #define MSGPACK_DEFINE_ARRAY(...) \ |
29 | 29 | template <typename Packer> \ |
30 | | - void msgpack_pack(Packer& pk) const \ |
| 30 | + void msgpack_pack(Packer& msgpack_pk) const \ |
31 | 31 | { \ |
32 | | - msgpack::type::make_define_array(__VA_ARGS__).msgpack_pack(pk); \ |
| 32 | + msgpack::type::make_define_array(__VA_ARGS__).msgpack_pack(msgpack_pk); \ |
33 | 33 | } \ |
34 | | - void msgpack_unpack(msgpack::object const& o) \ |
| 34 | + void msgpack_unpack(msgpack::object const& msgpack_o) \ |
35 | 35 | { \ |
36 | | - msgpack::type::make_define_array(__VA_ARGS__).msgpack_unpack(o); \ |
| 36 | + msgpack::type::make_define_array(__VA_ARGS__).msgpack_unpack(msgpack_o); \ |
37 | 37 | }\ |
38 | 38 | template <typename MSGPACK_OBJECT> \ |
39 | | - void msgpack_object(MSGPACK_OBJECT* o, msgpack::zone& z) const \ |
| 39 | + void msgpack_object(MSGPACK_OBJECT* msgpack_o, msgpack::zone& msgpack_z) const \ |
40 | 40 | { \ |
41 | | - msgpack::type::make_define_array(__VA_ARGS__).msgpack_object(o, z); \ |
| 41 | + msgpack::type::make_define_array(__VA_ARGS__).msgpack_object(msgpack_o, msgpack_z); \ |
42 | 42 | } |
43 | 43 |
|
44 | 44 | #define MSGPACK_BASE_ARRAY(base) (*const_cast<base *>(static_cast<base const*>(this))) |
|
62 | 62 |
|
63 | 63 | #define MSGPACK_DEFINE_MAP(...) \ |
64 | 64 | template <typename Packer> \ |
65 | | - void msgpack_pack(Packer& pk) const \ |
| 65 | + void msgpack_pack(Packer& msgpack_pk) const \ |
66 | 66 | { \ |
67 | 67 | msgpack::type::make_define_map \ |
68 | 68 | MSGPACK_DEFINE_MAP_IMPL(__VA_ARGS__) \ |
69 | | - .msgpack_pack(pk); \ |
| 69 | + .msgpack_pack(msgpack_pk); \ |
70 | 70 | } \ |
71 | | - void msgpack_unpack(msgpack::object const& o) \ |
| 71 | + void msgpack_unpack(msgpack::object const& msgpack_o) \ |
72 | 72 | { \ |
73 | 73 | msgpack::type::make_define_map \ |
74 | 74 | MSGPACK_DEFINE_MAP_IMPL(__VA_ARGS__) \ |
75 | | - .msgpack_unpack(o); \ |
| 75 | + .msgpack_unpack(msgpack_o); \ |
76 | 76 | }\ |
77 | 77 | template <typename MSGPACK_OBJECT> \ |
78 | | - void msgpack_object(MSGPACK_OBJECT* o, msgpack::zone& z) const \ |
| 78 | + void msgpack_object(MSGPACK_OBJECT* msgpack_o, msgpack::zone& msgpack_z) const \ |
79 | 79 | { \ |
80 | 80 | msgpack::type::make_define_map \ |
81 | 81 | MSGPACK_DEFINE_MAP_IMPL(__VA_ARGS__) \ |
82 | | - .msgpack_object(o, z); \ |
| 82 | + .msgpack_object(msgpack_o, msgpack_z); \ |
83 | 83 | } |
84 | 84 |
|
85 | 85 | #define MSGPACK_BASE_MAP(base) \ |
|
94 | 94 | namespace adaptor { \ |
95 | 95 | template<> \ |
96 | 96 | struct convert<enum_name> { \ |
97 | | - msgpack::object const& operator()(msgpack::object const& o, enum_name& v) const { \ |
| 97 | + msgpack::object const& operator()(msgpack::object const& msgpack_o, enum_name& msgpack_v) const { \ |
98 | 98 | msgpack::underlying_type<enum_name>::type tmp; \ |
99 | | - msgpack::operator>>(o, tmp); \ |
100 | | - v = static_cast<enum_name>(tmp); \ |
101 | | - return o; \ |
| 99 | + msgpack::operator>>(msgpack_o, tmp); \ |
| 100 | + msgpack_v = static_cast<enum_name>(tmp); \ |
| 101 | + return msgpack_o; \ |
102 | 102 | } \ |
103 | 103 | }; \ |
104 | 104 | template<> \ |
105 | 105 | struct object<enum_name> { \ |
106 | | - void operator()(msgpack::object& o, const enum_name& v) const { \ |
107 | | - msgpack::underlying_type<enum_name>::type tmp = static_cast<msgpack::underlying_type<enum_name>::type>(v); \ |
108 | | - msgpack::operator<<(o, tmp); \ |
| 106 | + void operator()(msgpack::object& msgpack_o, const enum_name& msgpack_v) const { \ |
| 107 | + msgpack::underlying_type<enum_name>::type tmp = static_cast<msgpack::underlying_type<enum_name>::type>(msgpack_v); \ |
| 108 | + msgpack::operator<<(msgpack_o, tmp); \ |
109 | 109 | } \ |
110 | 110 | }; \ |
111 | 111 | template<> \ |
112 | 112 | struct object_with_zone<enum_name> { \ |
113 | | - void operator()(msgpack::object::with_zone& o, const enum_name& v) const { \ |
114 | | - msgpack::underlying_type<enum_name>::type tmp = static_cast<msgpack::underlying_type<enum_name>::type>(v); \ |
115 | | - msgpack::operator<<(o, tmp); \ |
| 113 | + void operator()(msgpack::object::with_zone& msgpack_o, const enum_name& msgpack_v) const { \ |
| 114 | + msgpack::underlying_type<enum_name>::type tmp = static_cast<msgpack::underlying_type<enum_name>::type>(msgpack_v); \ |
| 115 | + msgpack::operator<<(msgpack_o, tmp); \ |
116 | 116 | } \ |
117 | 117 | }; \ |
118 | 118 | template <> \ |
119 | 119 | struct pack<enum_name> { \ |
120 | 120 | template <typename Stream> \ |
121 | | - msgpack::packer<Stream>& operator()(msgpack::packer<Stream>& o, const enum_name& v) const { \ |
122 | | - return msgpack::operator<<(o, static_cast<msgpack::underlying_type<enum_name>::type>(v)); \ |
| 121 | + msgpack::packer<Stream>& operator()(msgpack::packer<Stream>& msgpack_o, const enum_name& msgpack_v) const { \ |
| 122 | + return msgpack::operator<<(msgpack_o, static_cast<msgpack::underlying_type<enum_name>::type>(msgpack_v)); \ |
123 | 123 | } \ |
124 | 124 | }; \ |
125 | 125 | } \ |
|
0 commit comments