Cosmetic improvements.
[invirt/third/libt4.git] / rpc / marshall_wrap.h
index 2d7fbfb..fa55f17 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "marshall.h"
 
-typedef function<int(unmarshall &, marshall &)> handler;
+typedef function<rpc_protocol::status(unmarshall &&, marshall &)> handler;
 
 //
 // Automatic marshalling wrappers for RPC handlers
@@ -71,7 +71,7 @@ template <class Functor, class Instance, class Signature,
 // between various types of callable objects at this level of abstraction.
 
 template <class F, class C, class ErrorHandler, class R, class RV, class... Args>
-struct marshalled_func_imp<F, C, RV(R&, Args...), ErrorHandler> {
+struct marshalled_func_imp<F, C, RV(R &, Args...), ErrorHandler> {
     static inline handler *wrap(F f, C *c=nullptr) {
         // This type definition corresponds to an empty struct with
         // template parameters running from 0 up to (# args) - 1.
@@ -82,10 +82,10 @@ struct marshalled_func_imp<F, C, RV(R&, Args...), ErrorHandler> {
         using ArgsStorage = tuple<typename decay<Args>::type...>;
         // Allocate a handler (i.e. function) to hold the lambda
         // which will unmarshall RPCs and call f.
-        return new handler([=](unmarshall &u, marshall &m) -> RV {
+        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<typename decay<Args>::type>()...};
+            ArgsStorage t{u._grab<typename decay<Args>::type>()...};
             // Verify successful unmarshalling of the entire input stream.
             if (!u.okdone())
                 return (RV)ErrorHandler::unmarshall_args_failure();