From 4819714edfa20586def0fdb88b9008677568ce1d Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Thu, 5 Sep 2013 06:04:20 -0700 Subject: [PATCH] Fix non c++11 gcc build errors --- modules/ripple_app/websocket/WSServerHandler.h | 4 +++- modules/ripple_core/test/ConnectionType.h | 1 + modules/ripple_net/basics/RPCDoor.cpp | 4 +++- modules/ripple_net/rpc/RPCSub.cpp | 5 +++-- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/modules/ripple_app/websocket/WSServerHandler.h b/modules/ripple_app/websocket/WSServerHandler.h index e3698e8cac..40b20b5705 100644 --- a/modules/ripple_app/websocket/WSServerHandler.h +++ b/modules/ripple_app/websocket/WSServerHandler.h @@ -165,7 +165,9 @@ public: try { - mMap [cpClient] = boost::make_shared< WSConnectionType > (m_source, *this, cpClient); + mMap [cpClient] = boost::make_shared < + WSConnectionType + > (boost::ref (m_source), boost::ref(*this), boost::cref(cpClient)); } catch (...) { diff --git a/modules/ripple_core/test/ConnectionType.h b/modules/ripple_core/test/ConnectionType.h index 78156a1513..d81e6eae1f 100644 --- a/modules/ripple_core/test/ConnectionType.h +++ b/modules/ripple_core/test/ConnectionType.h @@ -44,6 +44,7 @@ public: { m_peer = other.m_peer; m_inbound = other.m_inbound; + return *this; } /** Returns `true` if there is no connection. */ diff --git a/modules/ripple_net/basics/RPCDoor.cpp b/modules/ripple_net/basics/RPCDoor.cpp index 1bd4bfb3af..ccc8f3e30f 100644 --- a/modules/ripple_net/basics/RPCDoor.cpp +++ b/modules/ripple_net/basics/RPCDoor.cpp @@ -41,7 +41,9 @@ public: { // VFALCO NOTE Why not use make_shared? RPCServerImp::pointer new_connection (boost::make_shared ( - mAcceptor.get_io_service (), m_sslContext->get (), m_rpcServerHandler)); + boost::ref (mAcceptor.get_io_service ()), + boost::ref (m_sslContext->get ()), + boost::ref (m_rpcServerHandler))); mAcceptor.set_option (boost::asio::ip::tcp::acceptor::reuse_address (true)); diff --git a/modules/ripple_net/rpc/RPCSub.cpp b/modules/ripple_net/rpc/RPCSub.cpp index 70e1852510..f4b9f90cc2 100644 --- a/modules/ripple_net/rpc/RPCSub.cpp +++ b/modules/ripple_net/rpc/RPCSub.cpp @@ -190,6 +190,7 @@ RPCSub::pointer RPCSub::New (InfoSub::Source& source, const std::string& strUrl, const std::string& strUsername, const std::string& strPassword) { - return boost::make_shared (source, io_service, jobQueue, - strUrl, strUsername, strPassword); + return boost::make_shared (boost::ref (source), + boost::ref (io_service), boost::ref (jobQueue), + strUrl, strUsername, strPassword); } \ No newline at end of file