From c9be386a30dc7145ac757fae66c255b21da26d5d Mon Sep 17 00:00:00 2001 From: Peter Iannucci Date: Mon, 30 Sep 2013 14:33:44 -0400 Subject: [PATCH] Renamed a method that isn't part of the public interface of unmarshall --- rpc/marshall.h | 16 ++++++++-------- rpc/marshall_wrap.h | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/rpc/marshall.h b/rpc/marshall.h index 0fcbfaf..597c0fc 100644 --- a/rpc/marshall.h +++ b/rpc/marshall.h @@ -72,7 +72,7 @@ class unmarshall { index_ += n; } - template void + template inline void unpack_header(T & h) { VERIFY(sizeof(T)+sizeof(rpc_sz_t) <= RPC_HEADER_SZ); // first 4 bytes hold length field @@ -81,7 +81,7 @@ class unmarshall { index_ = RPC_HEADER_SZ; } - template inline T grab() { T t; *this >> t; return t; } + template inline T _grab() { T t; *this >> t; return t; } }; // @@ -175,10 +175,10 @@ operator<<(marshall &m, const A &x) { template inline typename enable_if::value, unmarshall>::type & operator>>(unmarshall &u, A &x) { - unsigned n = u.grab(); + unsigned n = u._grab(); x.clear(); while (n--) - x.emplace_back(u.grab()); + x.emplace_back(u._grab()); return u; } @@ -196,10 +196,10 @@ operator>>(unmarshall &u, pair &d) { // std::map template inline unmarshall & operator>>(unmarshall &u, map &x) { - unsigned n = u.grab(); + unsigned n = u._grab(); x.clear(); while (n--) - x.emplace(u.grab>()); + x.emplace(u._grab>()); return u; } @@ -211,7 +211,7 @@ inline marshall & operator<<(marshall &m, const string &s) { } inline unmarshall & operator>>(unmarshall &u, string &s) { - uint32_t sz = u.grab(); + uint32_t sz = u._grab(); if (u.ok()) { s.resize(sz); u.rawbytes(&s[0], sz); @@ -230,7 +230,7 @@ operator<<(marshall &m, E e) { template typename enable_if::value, unmarshall>::type & operator>>(unmarshall &u, E &e) { - e = to_enum(u.grab>()); + e = to_enum(u._grab>()); return u; } diff --git a/rpc/marshall_wrap.h b/rpc/marshall_wrap.h index 2d7fbfb..8d5b15a 100644 --- a/rpc/marshall_wrap.h +++ b/rpc/marshall_wrap.h @@ -85,7 +85,7 @@ struct marshalled_func_imp { return new handler([=](unmarshall &u, marshall &m) -> RV { // Unmarshall each argument with the correct type and store the // result in a tuple. - ArgsStorage t = {u.grab::type>()...}; + ArgsStorage t = {u._grab::type>()...}; // Verify successful unmarshalling of the entire input stream. if (!u.okdone()) return (RV)ErrorHandler::unmarshall_args_failure(); -- 1.7.9.5