From f1e681bf8334811e52d17aa287acc889fcef3dbe Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Mon, 3 Apr 2017 15:11:27 -0700 Subject: [PATCH] common/ceph_json: map type can handle 2 or 3 template arguments Signed-off-by: Yehuda Sadeh --- src/common/ceph_json.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/common/ceph_json.h b/src/common/ceph_json.h index 18cf06fd4f1..6c9e3b4174d 100644 --- a/src/common/ceph_json.h +++ b/src/common/ceph_json.h @@ -210,8 +210,8 @@ void decode_json_obj(vector& l, JSONObj *obj) } } -template -void decode_json_obj(map& m, JSONObj *obj) +template > +void decode_json_obj(map& m, JSONObj *obj) { m.clear(); @@ -384,11 +384,11 @@ static void encode_json(const char *name, const std::vector& l, ceph::Formatt f->close_section(); } -template -static void encode_json(const char *name, const std::map& m, ceph::Formatter *f) +template > +static void encode_json(const char *name, const std::map& m, ceph::Formatter *f) { f->open_array_section(name); - for (typename std::map::const_iterator i = m.begin(); i != m.end(); ++i) { + for (typename std::map::const_iterator i = m.begin(); i != m.end(); ++i) { f->open_object_section("entry"); encode_json("key", i->first, f); encode_json("val", i->second, f); -- 2.47.3