From 1ba46a30ce2cfb7d99a7011a92212f296c46a5c2 Mon Sep 17 00:00:00 2001 From: Takatoshi Kondo Date: Sat, 4 Nov 2017 12:55:22 +0900 Subject: [PATCH] Fixed #640. Replaced comma with semi colon. Unified cording style. --- include/msgpack/v1/adaptor/fixint.hpp | 64 +++++++++++-------- include/msgpack/v1/adaptor/int.hpp | 88 +++++++++++++++++---------- 2 files changed, 95 insertions(+), 57 deletions(-) diff --git a/include/msgpack/v1/adaptor/fixint.hpp b/include/msgpack/v1/adaptor/fixint.hpp index eba647ed..7361edf9 100644 --- a/include/msgpack/v1/adaptor/fixint.hpp +++ b/include/msgpack/v1/adaptor/fixint.hpp @@ -201,75 +201,91 @@ struct object { template <> struct object { - void operator()(msgpack::object& o, type::fix_uint8 v) const - { o.type = msgpack::type::POSITIVE_INTEGER, o.via.u64 = v.get(); } + void operator()(msgpack::object& o, type::fix_uint8 v) const { + o.type = msgpack::type::POSITIVE_INTEGER; + o.via.u64 = v.get(); + } }; template <> struct object { - void operator()(msgpack::object& o, type::fix_uint16 v) const - { o.type = msgpack::type::POSITIVE_INTEGER, o.via.u64 = v.get(); } + void operator()(msgpack::object& o, type::fix_uint16 v) const { + o.type = msgpack::type::POSITIVE_INTEGER; + o.via.u64 = v.get(); + } }; template <> struct object { - void operator()(msgpack::object& o, type::fix_uint32 v) const - { o.type = msgpack::type::POSITIVE_INTEGER, o.via.u64 = v.get(); } + void operator()(msgpack::object& o, type::fix_uint32 v) const { + o.type = msgpack::type::POSITIVE_INTEGER; + o.via.u64 = v.get(); + } }; template <> struct object { - void operator()(msgpack::object& o, type::fix_uint64 v) const - { o.type = msgpack::type::POSITIVE_INTEGER, o.via.u64 = v.get(); } + void operator()(msgpack::object& o, type::fix_uint64 v) const { + o.type = msgpack::type::POSITIVE_INTEGER; + o.via.u64 = v.get(); + } }; template <> struct object_with_zone { - void operator()(msgpack::object::with_zone& o, type::fix_int8 v) const - { static_cast(o) << v; } + void operator()(msgpack::object::with_zone& o, type::fix_int8 v) const { + static_cast(o) << v; + } }; template <> struct object_with_zone { - void operator()(msgpack::object::with_zone& o, type::fix_int16 v) const - { static_cast(o) << v; } + void operator()(msgpack::object::with_zone& o, type::fix_int16 v) const { + static_cast(o) << v; + } }; template <> struct object_with_zone { - void operator()(msgpack::object::with_zone& o, type::fix_int32 v) const - { static_cast(o) << v; } + void operator()(msgpack::object::with_zone& o, type::fix_int32 v) const { + static_cast(o) << v; + } }; template <> struct object_with_zone { - void operator()(msgpack::object::with_zone& o, type::fix_int64 v) const - { static_cast(o) << v; } + void operator()(msgpack::object::with_zone& o, type::fix_int64 v) const { + static_cast(o) << v; + } }; template <> struct object_with_zone { - void operator()(msgpack::object::with_zone& o, type::fix_uint8 v) const - { static_cast(o) << v; } + void operator()(msgpack::object::with_zone& o, type::fix_uint8 v) const { + static_cast(o) << v; + } }; template <> struct object_with_zone { - void operator()(msgpack::object::with_zone& o, type::fix_uint16 v) const - { static_cast(o) << v; } + void operator()(msgpack::object::with_zone& o, type::fix_uint16 v) const { + static_cast(o) << v; + } }; template <> struct object_with_zone { - void operator()(msgpack::object::with_zone& o, type::fix_uint32 v) const - { static_cast(o) << v; } + void operator()(msgpack::object::with_zone& o, type::fix_uint32 v) const { + static_cast(o) << v; + } }; template <> struct object_with_zone { - void operator()(msgpack::object::with_zone& o, type::fix_uint64 v) const - { static_cast(o) << v; } + void operator()(msgpack::object::with_zone& o, type::fix_uint64 v) const { + static_cast(o) << v; + } }; } // namespace adaptor diff --git a/include/msgpack/v1/adaptor/int.hpp b/include/msgpack/v1/adaptor/int.hpp index 45d90586..962e66ff 100644 --- a/include/msgpack/v1/adaptor/int.hpp +++ b/include/msgpack/v1/adaptor/int.hpp @@ -82,7 +82,8 @@ struct object_char_sign { template <> struct object_char_sign { static void make(msgpack::object& o, char v) { - o.type = msgpack::type::POSITIVE_INTEGER, o.via.u64 = v; + o.type = msgpack::type::POSITIVE_INTEGER; + o.via.u64 = v; } }; @@ -320,99 +321,120 @@ struct object { template <> struct object { - void operator()(msgpack::object& o, unsigned char v) const - { o.type = msgpack::type::POSITIVE_INTEGER, o.via.u64 = v; } + void operator()(msgpack::object& o, unsigned char v) const { + o.type = msgpack::type::POSITIVE_INTEGER; + o.via.u64 = v; + } }; template <> struct object { - void operator()(msgpack::object& o, unsigned short v) const - { o.type = msgpack::type::POSITIVE_INTEGER, o.via.u64 = v; } + void operator()(msgpack::object& o, unsigned short v) const { + o.type = msgpack::type::POSITIVE_INTEGER; + o.via.u64 = v; + } }; template <> struct object { - void operator()(msgpack::object& o, unsigned int v) const - { o.type = msgpack::type::POSITIVE_INTEGER, o.via.u64 = v; } + void operator()(msgpack::object& o, unsigned int v) const { + o.type = msgpack::type::POSITIVE_INTEGER; + o.via.u64 = v; + } }; template <> struct object { - void operator()(msgpack::object& o, unsigned long v) const - { o.type = msgpack::type::POSITIVE_INTEGER, o.via.u64 = v; } + void operator()(msgpack::object& o, unsigned long v) const { + o.type = msgpack::type::POSITIVE_INTEGER; + o.via.u64 = v; + } }; template <> struct object { - void operator()(msgpack::object& o, unsigned long long v) const - { o.type = msgpack::type::POSITIVE_INTEGER, o.via.u64 = v; } + void operator()(msgpack::object& o, unsigned long long v) const { + o.type = msgpack::type::POSITIVE_INTEGER; + o.via.u64 = v; + } }; template <> struct object_with_zone { - void operator()(msgpack::object::with_zone& o, char v) const - { static_cast(o) << v; } + void operator()(msgpack::object::with_zone& o, char v) const { + static_cast(o) << v; + } }; template <> struct object_with_zone { - void operator()(msgpack::object::with_zone& o, signed char v) const - { static_cast(o) << v; } + void operator()(msgpack::object::with_zone& o, signed char v) const { + static_cast(o) << v; + } }; template <> struct object_with_zone { - void operator()(msgpack::object::with_zone& o, signed short v) const - { static_cast(o) << v; } + void operator()(msgpack::object::with_zone& o, signed short v) const { + static_cast(o) << v; + } }; template <> struct object_with_zone { - void operator()(msgpack::object::with_zone& o, signed int v) const - { static_cast(o) << v; } + void operator()(msgpack::object::with_zone& o, signed int v) const { + static_cast(o) << v; + } }; template <> struct object_with_zone { - void operator()(msgpack::object::with_zone& o, signed long v) const - { static_cast(o) << v; } + void operator()(msgpack::object::with_zone& o, signed long v) const { + static_cast(o) << v; + } }; template <> struct object_with_zone { - void operator()(msgpack::object::with_zone& o, const signed long long& v) const - { static_cast(o) << v; } + void operator()(msgpack::object::with_zone& o, const signed long long& v) const { + static_cast(o) << v; + } }; template <> struct object_with_zone { - void operator()(msgpack::object::with_zone& o, unsigned char v) const - { static_cast(o) << v; } + void operator()(msgpack::object::with_zone& o, unsigned char v) const { + static_cast(o) << v; + } }; template <> struct object_with_zone { - void operator()(msgpack::object::with_zone& o, unsigned short v) const - { static_cast(o) << v; } + void operator()(msgpack::object::with_zone& o, unsigned short v) const { + static_cast(o) << v; + } }; template <> struct object_with_zone { - void operator()(msgpack::object::with_zone& o, unsigned int v) const - { static_cast(o) << v; } + void operator()(msgpack::object::with_zone& o, unsigned int v) const { + static_cast(o) << v; + } }; template <> struct object_with_zone { - void operator()(msgpack::object::with_zone& o, unsigned long v) const - { static_cast(o) << v; } + void operator()(msgpack::object::with_zone& o, unsigned long v) const { + static_cast(o) << v; + } }; template <> struct object_with_zone { - void operator()(msgpack::object::with_zone& o, const unsigned long long& v) const - { static_cast(o) << v; } + void operator()(msgpack::object::with_zone& o, const unsigned long long& v) const { + static_cast(o) << v; + } }; } // namespace adaptor