Clean-ups
[invirt/third/libt4.git] / rsm_client.h
index 06ca5a6..90b5b06 100644 (file)
@@ -15,8 +15,8 @@
 class rsm_client {
     protected:
         string primary;
-        vector<string> known_mems;
-        mutex rsm_client_mutex;
+        std::vector<string> known_mems;
+        std::mutex rsm_client_mutex;
         void primary_failure(lock & rsm_client_mutex_lock);
         bool init_members(lock & rsm_client_mutex_lock);
         rsm_protocol::status invoke(unsigned int proc, string & rep, const string & req);
@@ -25,7 +25,7 @@ class rsm_client {
         rsm_client(string dst);
 
         template<class P, class R, class ...Args>
-        int call(rpc_protocol::proc_t<P> proc, R & r, const Args & ...a1) {
+        inline int call(rpc_protocol::proc_t<P> proc, R & r, const Args & ...a1) {
             static_assert(is_valid_call<P, R, Args...>::value, "RSM method invoked with incorrect argument types");
             return call_m(proc.id, r, marshall(a1...));
         }
@@ -50,19 +50,19 @@ int rsm_client::call_m(unsigned int proc, R & r, const marshall & req) {
     string res;
     u >> res;
     if (!u.okdone()) {
-        LOG("failed to unmarshall the reply.");
-        LOG("You probably forgot to set the reply string in " <<
-            "rsm::client_invoke, or you may have called RPC " <<
-            "0x" << hex << proc << " with the wrong return type");
-        LOG("here's what I got: \"" << hexify(rep) << "\"");
+        LOG << "failed to unmarshall the reply.";
+        LOG << "You probably forgot to set the reply string in "
+            << "rsm::client_invoke, or you may have called RPC "
+            << "0x" << std::hex << proc << " with the wrong return type";
+        LOG << "here's what I got: \"" << hexify(rep) << "\"";
         VERIFY(0);
         return rpc_protocol::unmarshall_reply_failure;
     }
     if(!unmarshall(res, false, r).okdone()) {
-        LOG("failed to unmarshall the reply.");
-        LOG("You are probably calling RPC 0x" << hex << proc <<
-            " with the wrong return type.");
-        LOG("here's what I got: \"" << hexify(res) << "\"");
+        LOG << "failed to unmarshall the reply.";
+        LOG << "You are probably calling RPC 0x" << std::hex << proc
+            << " with the wrong return type.";
+        LOG << "here's what I got: \"" << hexify(res) << "\"";
         VERIFY(0);
         return rpc_protocol::unmarshall_reply_failure;
     }