diff --git a/include/fc/rpc/api_connection.hpp b/include/fc/rpc/api_connection.hpp index 44fc7c3..c2268ea 100644 --- a/include/fc/rpc/api_connection.hpp +++ b/include/fc/rpc/api_connection.hpp @@ -168,7 +168,7 @@ namespace fc { struct api_visitor { - api_visitor( generic_api& a, const std::weak_ptr& s ):api(a),_api_con(s){ } + api_visitor( generic_api& a, const std::weak_ptr& s ):_api(a),_api_con(s){ } template std::function to_generic( const std::function(Args...)>& f )const; @@ -187,11 +187,11 @@ namespace fc { template void operator()( const char* name, std::function& memb )const { - api._methods.emplace_back( to_generic( memb ) ); - api._by_name[name] = api._methods.size() - 1; + _api._methods.emplace_back( to_generic( memb ) ); + _api._by_name[name] = _api._methods.size() - 1; } - generic_api& api; + generic_api& _api; const std::weak_ptr& _api_con; }; @@ -382,7 +382,7 @@ namespace fc { const std::function(Args...)>& f )const { auto api_con = _api_con; - auto gapi = &api; + auto gapi = &_api; return [=]( const variants& args ) { auto con = api_con.lock(); FC_ASSERT( con, "not connected" ); @@ -396,7 +396,7 @@ namespace fc { const std::function>(Args...)>& f )const { auto api_con = _api_con; - auto gapi = &api; + auto gapi = &_api; return [=]( const variants& args )-> fc::variant { auto con = api_con.lock(); FC_ASSERT( con, "not connected" ); @@ -413,7 +413,7 @@ namespace fc { const std::function& f )const { auto api_con = _api_con; - auto gapi = &api; + auto gapi = &_api; return [=]( const variants& args ) -> fc::variant { auto con = api_con.lock(); FC_ASSERT( con, "not connected" ); @@ -428,7 +428,7 @@ namespace fc { template std::function generic_api::api_visitor::to_generic( const std::function& f )const { - generic_api* gapi = &api; + generic_api* gapi = &_api; return [f,gapi]( const variants& args ) { return variant( gapi->call_generic( f, args.begin(), args.end() ) ); }; @@ -437,7 +437,7 @@ namespace fc { template std::function generic_api::api_visitor::to_generic( const std::function& f )const { - generic_api* gapi = &api; + generic_api* gapi = &_api; return [f,gapi]( const variants& args ) { gapi->call_generic( f, args.begin(), args.end() ); return variant();