From 506910147f104ae1b16957af2b0d79b033eccce8 Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Sun, 15 Jun 2014 18:26:50 -0700 Subject: [PATCH] Tidy up includes: * Replace boost with std equivalents: - bind, ref, cref, function, placeholders * More "include what you use" * Remove unnecessary includes --- Builds/VisualStudio2013/RippleD.vcxproj | 13 - .../VisualStudio2013/RippleD.vcxproj.filters | 18 - src/BeastConfig.h | 10 - .../beast/insight/impl/StatsDCollector.cpp | 24 +- .../beast/module/asio/http/HTTPClientType.cpp | 10 +- .../beast/module/asio/system/BoostIncludes.h | 16 - .../beast/module/asio/tests/TestPeerBasics.h | 2 + .../asio/tests/TestPeerLogicAsyncClient.cpp | 23 +- .../asio/tests/TestPeerLogicAsyncServer.cpp | 18 +- .../beast/module/asio/tests/TestPeerType.h | 13 +- src/beast/beast/module/core/core.h | 6 - src/beast/beast/module/core/core.unity.cpp | 3 - .../module/core/diagnostic/SemanticVersion.h | 7 +- src/beast/beast/module/core/logging/Logger.h | 2 + .../beast/module/core/system/BeforeBoost.h | 32 -- .../beast/module/core/system/BoostIncludes.h | 32 -- .../core/system/BoostPlaceholdersFix.cpp | 42 -- .../module/core/system/BoostPlaceholdersFix.h | 64 --- .../beast/module/core/system/Functional.h | 381 ------------------ .../module/core/system/FunctionalIncludes.h | 54 --- .../beast/module/core/text/StringArray.h | 1 + .../module/core/threads/CriticalSection.h | 1 + src/beast/beast/smart_ptr/ScopedPointer.h | 4 +- src/beast/beast/unit_test/reporter.h | 6 +- src/ripple/common/KeyCache.h | 2 - src/ripple/common/TaggedCache.h | 1 - src/ripple/common/impl/MultiSocketImpl.h | 4 +- src/ripple/common/impl/ResolverAsio.cpp | 29 +- src/ripple/http/impl/Door.h | 6 +- src/ripple/http/impl/Peer.h | 5 +- src/ripple/http/impl/ServerImpl.cpp | 4 +- .../module/app/consensus/LedgerConsensus.cpp | 8 +- .../module/app/ledger/AcceptedLedger.cpp | 2 +- .../module/app/ledger/AcceptedLedgerTx.cpp | 2 +- src/ripple/module/app/ledger/Ledger.cpp | 8 +- src/ripple/module/app/ledger/OrderBookDB.cpp | 12 +- src/ripple/module/app/main/Application.cpp | 34 +- .../module/app/main/CollectorManager.cpp | 2 + src/ripple/module/app/main/CollectorManager.h | 1 + .../module/app/main/FatalErrorReporter.cpp | 2 + src/ripple/module/app/main/IoServicePool.cpp | 10 +- src/ripple/module/app/main/IoServicePool.h | 8 +- src/ripple/module/app/main/LoadManager.cpp | 11 - src/ripple/module/app/main/LocalCredentials.h | 2 +- .../module/app/main/NodeStoreScheduler.cpp | 4 +- .../module/app/main/NodeStoreScheduler.h | 2 + src/ripple/module/app/main/RPCHTTPServer.cpp | 9 +- src/ripple/module/app/misc/NetworkOPs.cpp | 4 +- .../module/app/misc/SerializedLedger.cpp | 2 +- src/ripple/module/app/node/SqliteFactory.cpp | 2 + .../module/app/paths/RippleLineCache.cpp | 2 +- src/ripple/module/app/peers/PeerSet.cpp | 5 +- src/ripple/module/app/rpc/RPCHandler.cpp | 5 + .../module/app/rpc/RPCServerHandler.cpp | 4 + src/ripple/module/app/shamap/SHAMap.cpp | 4 +- src/ripple/module/app/shamap/SHAMap.h | 3 + src/ripple/module/app/shamap/SHAMapSync.cpp | 8 +- .../module/app/shamap/SHAMapSyncFilters.cpp | 2 +- src/ripple/module/app/tx/Transaction.cpp | 6 +- .../module/app/tx/TransactionMaster.cpp | 4 +- src/ripple/module/app/tx/TxQueue.cpp | 5 + .../module/app/websocket/WSConnection.cpp | 2 + .../module/app/websocket/WSConnection.h | 8 +- src/ripple/module/app/websocket/WSDoor.cpp | 1 + .../module/app/websocket/WSServerHandler.cpp | 2 + .../module/app/websocket/WSServerHandler.h | 6 +- .../module/basics/containers/RangeSet.cpp | 4 + .../module/basics/containers/RangeSet.h | 5 + src/ripple/module/basics/log/Log.h | 4 + src/ripple/module/basics/log/LogFile.cpp | 3 +- src/ripple/module/basics/log/LogFile.h | 5 +- src/ripple/module/basics/log/LogPartition.h | 2 + src/ripple/module/basics/log/LogSink.cpp | 1 + src/ripple/module/basics/log/LogSink.h | 5 +- .../module/basics/system/BoostIncludes.h | 15 - src/ripple/module/basics/types/BasicTypes.h | 8 +- .../module/basics/utility/CountedObject.cpp | 2 + src/ripple/module/basics/utility/IniFile.cpp | 4 +- .../module/basics/utility/StringUtilities.cpp | 4 +- .../module/basics/utility/StringUtilities.h | 5 + src/ripple/module/basics/utility/Sustain.cpp | 14 + .../module/basics/utility/ThreadName.cpp | 15 +- .../module/basics/utility/UptimeTimer.cpp | 2 + src/ripple/module/core/functional/Job.cpp | 2 +- src/ripple/module/core/functional/Job.h | 4 + .../module/core/functional/JobQueue.cpp | 4 +- src/ripple/module/core/functional/JobQueue.h | 2 + src/ripple/module/core/functional/JobTypes.h | 6 + .../module/core/functional/LoadMonitor.h | 2 + src/ripple/module/net/basics/RPCDoor.cpp | 6 +- src/ripple/module/net/basics/SNTPClient.cpp | 23 +- src/ripple/module/net/rpc/RPCSub.cpp | 4 +- src/ripple/module/overlay/api/Message.h | 2 - src/ripple/module/overlay/impl/PeerDoor.cpp | 9 +- src/ripple/module/overlay/impl/PeerImp.h | 16 +- .../module/rpc/handlers/AccountOffers.cpp | 2 +- .../module/rpc/handlers/RipplePathFind.cpp | 2 +- src/ripple/module/rpc/handlers/Submit.cpp | 2 +- .../module/websocket/autosocket/AutoSocket.h | 11 +- src/ripple/peerfinder/impl/Checker.cpp | 2 +- src/ripple/peerfinder/impl/Logic.h | 5 +- src/ripple/peerfinder/impl/Manager.cpp | 2 +- src/ripple/peerfinder/sim/Tests.cpp | 8 +- src/ripple/sitefiles/impl/Manager.cpp | 6 +- src/ripple/types/api/UInt160.h | 1 + src/ripple/unity/app.cpp | 46 --- src/ripple/unity/app.h | 1 - src/ripple/unity/app1.cpp | 1 - src/ripple/unity/basics.cpp | 28 +- src/ripple/unity/basics.h | 8 - src/ripple/unity/core.cpp | 1 - src/ripple/unity/data.cpp | 1 - src/ripple/unity/http.cpp | 1 - src/ripple/unity/net.cpp | 2 - src/ripple/unity/net.h | 1 - src/ripple/unity/peerfinder.cpp | 1 - src/ripple/unity/resource.cpp | 1 - src/ripple/unity/sitefiles.cpp | 1 - src/ripple/unity/sitefiles.h | 2 - src/ripple/unity/testoverlay.h | 1 - src/ripple/unity/types.h | 1 - src/ripple/unity/validators.cpp | 1 - src/ripple/unity/websocket.h | 1 - src/ripple/validators/impl/Tuning.h | 8 +- src/websocket/src/sockets/multitls.hpp | 4 +- 125 files changed, 343 insertions(+), 1012 deletions(-) delete mode 100644 src/beast/beast/module/core/system/BeforeBoost.h delete mode 100644 src/beast/beast/module/core/system/BoostIncludes.h delete mode 100644 src/beast/beast/module/core/system/BoostPlaceholdersFix.cpp delete mode 100644 src/beast/beast/module/core/system/BoostPlaceholdersFix.h delete mode 100644 src/beast/beast/module/core/system/Functional.h delete mode 100644 src/beast/beast/module/core/system/FunctionalIncludes.h diff --git a/Builds/VisualStudio2013/RippleD.vcxproj b/Builds/VisualStudio2013/RippleD.vcxproj index 19a351089a..78ac8aedd1 100644 --- a/Builds/VisualStudio2013/RippleD.vcxproj +++ b/Builds/VisualStudio2013/RippleD.vcxproj @@ -794,19 +794,6 @@ - - - - - - True - - - - - - - diff --git a/Builds/VisualStudio2013/RippleD.vcxproj.filters b/Builds/VisualStudio2013/RippleD.vcxproj.filters index de45b5fa97..dc7ffcfbd8 100644 --- a/Builds/VisualStudio2013/RippleD.vcxproj.filters +++ b/Builds/VisualStudio2013/RippleD.vcxproj.filters @@ -1485,24 +1485,6 @@ beast\module\core\streams - - beast\module\core\system - - - beast\module\core\system - - - beast\module\core\system - - - beast\module\core\system - - - beast\module\core\system - - - beast\module\core\system - beast\module\core\system diff --git a/src/BeastConfig.h b/src/BeastConfig.h index 801f7fd245..5ccadf2f4a 100644 --- a/src/BeastConfig.h +++ b/src/BeastConfig.h @@ -166,16 +166,6 @@ #define RIPPLE_DUMP_LEAKS_ON_EXIT 1 #endif -/** Config: RIPPLE_TRACK_MUTEXES - Turns on a feature that enables tracking and diagnostics for mutex - and recursive mutex objects. This affects the type of lock used - by RippleMutex and RippleRecursiveMutex - @note This can slow down performance considerably. -*/ -#ifndef RIPPLE_TRACK_MUTEXES -#define RIPPLE_TRACK_MUTEXES 0 -#endif - //------------------------------------------------------------------------------ // These control whether or not certain functionality gets diff --git a/src/beast/beast/insight/impl/StatsDCollector.cpp b/src/beast/beast/insight/impl/StatsDCollector.cpp index 8d1b1d7828..9d6d586445 100644 --- a/src/beast/beast/insight/impl/StatsDCollector.cpp +++ b/src/beast/beast/insight/impl/StatsDCollector.cpp @@ -18,17 +18,15 @@ //============================================================================== #include +#include #include #include - #include -#include -#include #include - #include #include #include +#include #include #include #include @@ -238,7 +236,7 @@ public: : m_journal (journal) , m_address (address) , m_prefix (prefix) - , m_work (boost::ref (m_io_service)) + , m_work (std::ref (m_io_service)) , m_timer (m_io_service) , m_socket (m_io_service) , m_thread (&StatsDCollectorImp::run, this) @@ -372,10 +370,10 @@ public: #if BEAST_STATSDCOLLECTOR_TRACING_ENABLED log (buffers); #endif - m_socket.async_send (buffers, boost::bind ( + m_socket.async_send (buffers, std::bind ( &StatsDCollectorImp::on_send, this, - boost::asio::placeholders::error, - boost::asio::placeholders::bytes_transferred)); + beast::asio::placeholders::error, + beast::asio::placeholders::bytes_transferred)); buffers.clear (); size = 0; } @@ -387,10 +385,10 @@ public: #if BEAST_STATSDCOLLECTOR_TRACING_ENABLED log (buffers); #endif - m_socket.async_send (buffers, boost::bind ( + m_socket.async_send (buffers, std::bind ( &StatsDCollectorImp::on_send, this, - boost::asio::placeholders::error, - boost::asio::placeholders::bytes_transferred)); + beast::asio::placeholders::error, + beast::asio::placeholders::bytes_transferred)); } m_data.clear (); } @@ -398,9 +396,9 @@ public: void set_timer () { m_timer.expires_from_now (boost::posix_time::seconds (1)); - m_timer.async_wait (boost::bind ( + m_timer.async_wait (std::bind ( &StatsDCollectorImp::on_timer, this, - boost::asio::placeholders::error)); + beast::asio::placeholders::error)); } void on_timer (boost::system::error_code ec) diff --git a/src/beast/beast/module/asio/http/HTTPClientType.cpp b/src/beast/beast/module/asio/http/HTTPClientType.cpp index 2527d372ef..a7ba129447 100644 --- a/src/beast/beast/module/asio/http/HTTPClientType.cpp +++ b/src/beast/beast/module/asio/http/HTTPClientType.cpp @@ -20,7 +20,7 @@ #include #include #include - +#include #include // namespace beast { @@ -71,8 +71,8 @@ public: { result_type result; boost::asio::io_service io_service; - async_get (io_service, url, beast::bind ( - &HTTPClientType::handle_get, beast::placeholders::_1, &result)); + async_get (io_service, url, std::bind ( + &HTTPClientType::handle_get, std::placeholders::_1, &result)); io_service.run (); return result; } @@ -656,8 +656,8 @@ public: HTTPClientBase::New (Journal(), timeoutSeconds)); client->async_get (t.get_io_service (), ParsedURL (s).url (), - beast::bind (&HTTPClient_test::handle_get, this, - beast::_1)); + std::bind (&HTTPClient_test::handle_get, this, + std::placeholders::_1)); t.start (); t.join (); diff --git a/src/beast/beast/module/asio/system/BoostIncludes.h b/src/beast/beast/module/asio/system/BoostIncludes.h index 4415e8e5f0..471a54a1f8 100644 --- a/src/beast/beast/module/asio/system/BoostIncludes.h +++ b/src/beast/beast/module/asio/system/BoostIncludes.h @@ -38,22 +38,6 @@ # endif #endif -// Unfortunately, we use some boost detail elements -// -// https://svn.boost.org/trac/boost/ticket/9024 - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - // work-around for broken #include diff --git a/src/beast/beast/module/asio/tests/TestPeerBasics.h b/src/beast/beast/module/asio/tests/TestPeerBasics.h index 676cca2c81..1d7fb87eb4 100644 --- a/src/beast/beast/module/asio/tests/TestPeerBasics.h +++ b/src/beast/beast/module/asio/tests/TestPeerBasics.h @@ -20,6 +20,8 @@ #ifndef BEAST_ASIO_TESTS_TESTPEERBASICS_H_INCLUDED #define BEAST_ASIO_TESTS_TESTPEERBASICS_H_INCLUDED +#include + namespace beast { namespace asio { diff --git a/src/beast/beast/module/asio/tests/TestPeerLogicAsyncClient.cpp b/src/beast/beast/module/asio/tests/TestPeerLogicAsyncClient.cpp index af15148758..3dfc4ef928 100644 --- a/src/beast/beast/module/asio/tests/TestPeerLogicAsyncClient.cpp +++ b/src/beast/beast/module/asio/tests/TestPeerLogicAsyncClient.cpp @@ -17,6 +17,8 @@ */ //============================================================================== +#include + namespace beast { namespace asio { @@ -43,8 +45,8 @@ void TestPeerLogicAsyncClient::on_connect_async (error_code const& ec) if (socket ().needs_handshake ()) { socket ().async_handshake (abstract_socket::client, - boost::bind (&TestPeerLogicAsyncClient::on_handshake, this, - boost::asio::placeholders::error)); + std::bind (&TestPeerLogicAsyncClient::on_handshake, this, + beast::asio::placeholders::error)); } else { @@ -58,8 +60,9 @@ void TestPeerLogicAsyncClient::on_handshake (error_code const& ec) return finished (); boost::asio::async_write (socket (), boost::asio::buffer ("hello", 5), - boost::bind (&TestPeerLogicAsyncClient::on_write, this, - boost::asio::placeholders::error, boost::asio::placeholders::bytes_transferred)); + std::bind (&TestPeerLogicAsyncClient::on_write, this, + beast::asio::placeholders::error, + beast::asio::placeholders::bytes_transferred)); } void TestPeerLogicAsyncClient::on_write (error_code const& ec, std::size_t bytes_transferred) @@ -71,8 +74,8 @@ void TestPeerLogicAsyncClient::on_write (error_code const& ec, std::size_t bytes return finished (); boost::asio::async_read_until (socket (), m_buf, std::string ("goodbye"), - boost::bind (&TestPeerLogicAsyncClient::on_read, this, - boost::asio::placeholders::error, boost::asio::placeholders::bytes_transferred)); + std::bind (&TestPeerLogicAsyncClient::on_read, this, + beast::asio::placeholders::error, beast::asio::placeholders::bytes_transferred)); } void TestPeerLogicAsyncClient::on_read (error_code const& ec, std::size_t bytes_transferred) @@ -89,8 +92,8 @@ void TestPeerLogicAsyncClient::on_read (error_code const& ec, std::size_t bytes_ // Fire up a 1 byte read, to wait for the server to // shut down its end of the connection. boost::asio::async_read (socket (), m_buf.prepare (1), - boost::bind (&TestPeerLogicAsyncClient::on_read_final, this, - boost::asio::placeholders::error, boost::asio::placeholders::bytes_transferred)); + std::bind (&TestPeerLogicAsyncClient::on_read_final, this, + beast::asio::placeholders::error, beast::asio::placeholders::bytes_transferred)); } void TestPeerLogicAsyncClient::on_read_final (error_code const& ec, std::size_t) @@ -104,8 +107,8 @@ void TestPeerLogicAsyncClient::on_read_final (error_code const& ec, std::size_t) { if (socket ().needs_handshake ()) { - socket ().async_shutdown (boost::bind (&TestPeerLogicAsyncClient::on_shutdown, this, - boost::asio::placeholders::error)); + socket ().async_shutdown (std::bind (&TestPeerLogicAsyncClient::on_shutdown, this, + beast::asio::placeholders::error)); } else { diff --git a/src/beast/beast/module/asio/tests/TestPeerLogicAsyncServer.cpp b/src/beast/beast/module/asio/tests/TestPeerLogicAsyncServer.cpp index 76b7567577..da3d51fe00 100644 --- a/src/beast/beast/module/asio/tests/TestPeerLogicAsyncServer.cpp +++ b/src/beast/beast/module/asio/tests/TestPeerLogicAsyncServer.cpp @@ -17,6 +17,8 @@ */ //============================================================================== +#include + namespace beast { namespace asio { @@ -43,8 +45,8 @@ void TestPeerLogicAsyncServer::on_connect_async (error_code const& ec) if (socket ().needs_handshake ()) { socket ().async_handshake (abstract_socket::server, - boost::bind (&TestPeerLogicAsyncServer::on_handshake, this, - boost::asio::placeholders::error)); + std::bind (&TestPeerLogicAsyncServer::on_handshake, this, + beast::asio::placeholders::error)); } else { @@ -58,8 +60,8 @@ void TestPeerLogicAsyncServer::on_handshake (error_code const& ec) return finished (); boost::asio::async_read_until (socket (), m_buf, std::string ("hello"), - boost::bind (&TestPeerLogicAsyncServer::on_read, this, - boost::asio::placeholders::error, boost::asio::placeholders::bytes_transferred)); + std::bind (&TestPeerLogicAsyncServer::on_read, this, + beast::asio::placeholders::error, beast::asio::placeholders::bytes_transferred)); } void TestPeerLogicAsyncServer::on_read (error_code const& ec, std::size_t bytes_transferred) @@ -71,8 +73,8 @@ void TestPeerLogicAsyncServer::on_read (error_code const& ec, std::size_t bytes_ return finished (); boost::asio::async_write (socket (), boost::asio::buffer ("goodbye", 7), - boost::bind (&TestPeerLogicAsyncServer::on_write, this, - boost::asio::placeholders::error, boost::asio::placeholders::bytes_transferred)); + std::bind (&TestPeerLogicAsyncServer::on_write, this, + beast::asio::placeholders::error, beast::asio::placeholders::bytes_transferred)); } void TestPeerLogicAsyncServer::on_write (error_code const& ec, std::size_t bytes_transferred) @@ -85,8 +87,8 @@ void TestPeerLogicAsyncServer::on_write (error_code const& ec, std::size_t bytes if (socket ().needs_handshake ()) { - socket ().async_shutdown (boost::bind (&TestPeerLogicAsyncServer::on_shutdown, this, - boost::asio::placeholders::error)); + socket ().async_shutdown (std::bind (&TestPeerLogicAsyncServer::on_shutdown, this, + beast::asio::placeholders::error)); } else { diff --git a/src/beast/beast/module/asio/tests/TestPeerType.h b/src/beast/beast/module/asio/tests/TestPeerType.h index 6dc0d6b761..47b1d323a0 100644 --- a/src/beast/beast/module/asio/tests/TestPeerType.h +++ b/src/beast/beast/module/asio/tests/TestPeerType.h @@ -20,6 +20,8 @@ #ifndef BEAST_ASIO_TESTS_TESTPEERTYPE_H_INCLUDED #define BEAST_ASIO_TESTS_TESTPEERTYPE_H_INCLUDED +#include + namespace beast { namespace asio { @@ -98,8 +100,8 @@ public: m_timer.expires_from_now ( boost::posix_time::seconds (timeoutSeconds)); - m_timer.async_wait (boost::bind (&This::on_deadline, - this, boost::asio::placeholders::error)); + m_timer.async_wait (std::bind (&This::on_deadline, + this, beast::asio::placeholders::error)); m_timer_set = true; } @@ -270,8 +272,8 @@ public: if (failure (error ())) return finished (); - get_acceptor ().async_accept (get_socket (), boost::bind ( - &This::on_accept, this, boost::asio::placeholders::error)); + get_acceptor ().async_accept (get_socket (), std::bind ( + &This::on_accept, this, beast::asio::placeholders::error)); } //-------------------------------------------------------------------------- @@ -289,7 +291,8 @@ public: void run_async_client () { get_native_socket ().async_connect (get_endpoint (get_role ()), - boost::bind (&Logic::on_connect_async, this, boost::asio::placeholders::error)); + std::bind (&Logic::on_connect_async, this, + beast::asio::placeholders::error)); } //-------------------------------------------------------------------------- diff --git a/src/beast/beast/module/core/core.h b/src/beast/beast/module/core/core.h index c4e9b54f44..f720550114 100644 --- a/src/beast/beast/module/core/core.h +++ b/src/beast/beast/module/core/core.h @@ -28,10 +28,6 @@ #include #include -#include -#include -#include - #if BEAST_MSVC # pragma warning (disable: 4251) // (DLL build warning, must be disabled before pushing the warning state) # pragma warning (push) @@ -78,8 +74,6 @@ class FileOutputStream; // Order matters, since headers don't have their own #include lines. // Add new includes to the bottom. -#include - #include #include #include diff --git a/src/beast/beast/module/core/core.unity.cpp b/src/beast/beast/module/core/core.unity.cpp index 23b32392aa..aa6a0756b5 100644 --- a/src/beast/beast/module/core/core.unity.cpp +++ b/src/beast/beast/module/core/core.unity.cpp @@ -232,6 +232,3 @@ void beast_reportFatalError (char const* message, char const* fileName, int line #pragma pop_macro("_aligned_offset_recalloc") #pragma pop_macro("_aligned_msize") #endif - -// Must be outside the namespace -#include diff --git a/src/beast/beast/module/core/diagnostic/SemanticVersion.h b/src/beast/beast/module/core/diagnostic/SemanticVersion.h index 2e58a3fa61..fba61f1a4c 100644 --- a/src/beast/beast/module/core/diagnostic/SemanticVersion.h +++ b/src/beast/beast/module/core/diagnostic/SemanticVersion.h @@ -20,8 +20,11 @@ #ifndef BEAST_SEMANTICVERSION_H_INCLUDED #define BEAST_SEMANTICVERSION_H_INCLUDED -namespace beast -{ +#include +#include +#include + +namespace beast { /** A Semantic Version number. diff --git a/src/beast/beast/module/core/logging/Logger.h b/src/beast/beast/module/core/logging/Logger.h index d41d458629..73aab2694a 100644 --- a/src/beast/beast/module/core/logging/Logger.h +++ b/src/beast/beast/module/core/logging/Logger.h @@ -24,6 +24,8 @@ #ifndef BEAST_LOGGER_H_INCLUDED #define BEAST_LOGGER_H_INCLUDED +#include + namespace beast { diff --git a/src/beast/beast/module/core/system/BeforeBoost.h b/src/beast/beast/module/core/system/BeforeBoost.h deleted file mode 100644 index 287d0d8505..0000000000 --- a/src/beast/beast/module/core/system/BeforeBoost.h +++ /dev/null @@ -1,32 +0,0 @@ -//------------------------------------------------------------------------------ -/* - This file is part of Beast: https://github.com/vinniefalco/Beast - Copyright 2013, Vinnie Falco - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ -//============================================================================== - -#ifndef BEAST_CORE_SYSTEM_BEFOREBOOST_H_INCLUDED -#define BEAST_CORE_SYSTEM_BEFOREBOOST_H_INCLUDED - -// TargetPlatform.h should not use anything from BeastConfig.h -#include - -// This file should be included before including any boost headers. -// If you don't include this file, and you include boost headers, -// Beast will generate a compile error with an explanation of why. - -#include - -#endif diff --git a/src/beast/beast/module/core/system/BoostIncludes.h b/src/beast/beast/module/core/system/BoostIncludes.h deleted file mode 100644 index dc4416feb9..0000000000 --- a/src/beast/beast/module/core/system/BoostIncludes.h +++ /dev/null @@ -1,32 +0,0 @@ -//------------------------------------------------------------------------------ -/* - This file is part of Beast: https://github.com/vinniefalco/Beast - Copyright 2013, Vinnie Falco - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ -//============================================================================== - -#ifndef BEAST_CORE_BOOSTINCLUDES_H_INCLUDED -#define BEAST_CORE_BOOSTINCLUDES_H_INCLUDED - -#if BEAST_USE_BOOST_FEATURES - -#include -#include -#include // for FifoFreeStoreWithTLS -#include - -#endif - -#endif diff --git a/src/beast/beast/module/core/system/BoostPlaceholdersFix.cpp b/src/beast/beast/module/core/system/BoostPlaceholdersFix.cpp deleted file mode 100644 index fc814c9ff1..0000000000 --- a/src/beast/beast/module/core/system/BoostPlaceholdersFix.cpp +++ /dev/null @@ -1,42 +0,0 @@ -//------------------------------------------------------------------------------ -/* - This file is part of Beast: https://github.com/vinniefalco/Beast - Copyright 2013, Vinnie Falco - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ -//============================================================================== - -#if BEAST_USE_BOOST_FEATURES - -namespace boost -{ - -namespace placeholders -{ - -boost::arg<1> _1; -boost::arg<2> _2; -boost::arg<3> _3; -boost::arg<4> _4; -boost::arg<5> _5; -boost::arg<6> _6; -boost::arg<7> _7; -boost::arg<8> _8; -boost::arg<9> _9; - -} - -} - -#endif diff --git a/src/beast/beast/module/core/system/BoostPlaceholdersFix.h b/src/beast/beast/module/core/system/BoostPlaceholdersFix.h deleted file mode 100644 index 2711c382b9..0000000000 --- a/src/beast/beast/module/core/system/BoostPlaceholdersFix.h +++ /dev/null @@ -1,64 +0,0 @@ -//------------------------------------------------------------------------------ -/* - This file is part of Beast: https://github.com/vinniefalco/Beast - Copyright 2013, Vinnie Falco - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ -//============================================================================== - -#ifndef BEAST_CORE_SYSTEM_BOOSTPLACEHOLDERSFIX_H_INCLUDED -#define BEAST_CORE_SYSTEM_BOOSTPLACEHOLDERSFIX_H_INCLUDED - -#if BEAST_USE_BOOST_FEATURES - -// Prevent from being included -#ifdef BOOST_BIND_PLACEHOLDERS_HPP_INCLUDED -# error "boost/bind.hpp must not be included before this file" -#else -# define BOOST_BIND_PLACEHOLDERS_HPP_INCLUDED -#endif - -#include -#include - -// This is a hack to fix boost's goofy placeholders going into the global -// namespace. First we prevent the user from including boost/bind.hpp -// before us. Then we define the include guard macro and include -// boost/bind.hpp ourselves to get the declarations. Finally we repeat -// the missing placeholder declarations but put them in a proper namespace. -// -// We put the placeholders in boost::placeholders so they can be accessed -// explicitly to handle the common case of a "using namespace oost" directive -// being in effect. -// -// Declarations based on boost/bind/placeholders.cpp -// -namespace boost { -namespace placeholders { -extern boost::arg<1> _1; -extern boost::arg<2> _2; -extern boost::arg<3> _3; -extern boost::arg<4> _4; -extern boost::arg<5> _5; -extern boost::arg<6> _6; -extern boost::arg<7> _7; -extern boost::arg<8> _8; -extern boost::arg<9> _9; -} -using namespace placeholders; -} - -#endif - -#endif diff --git a/src/beast/beast/module/core/system/Functional.h b/src/beast/beast/module/core/system/Functional.h deleted file mode 100644 index faac1e13a0..0000000000 --- a/src/beast/beast/module/core/system/Functional.h +++ /dev/null @@ -1,381 +0,0 @@ -//------------------------------------------------------------------------------ -/* - This file is part of Beast: https://github.com/vinniefalco/Beast - Copyright 2013, Vinnie Falco - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ -//============================================================================== - -#ifndef BEAST_FUNCTIONAL_H_INCLUDED -#define BEAST_FUNCTIONAL_H_INCLUDED - -namespace beast -{ - -//------------------------------------------------------------------------------ - -/* Brings functional support into our namespace, based on environment. - - Notes on bind - - Difference between boost::bind and std::bind - http://stackoverflow.com/questions/10555566/is-there-any-difference-between-c11-stdbind-and-boostbind - - Resolving conflict between boost::shared_ptr and std::shared_ptr - http://stackoverflow.com/questions/4682343/how-to-resolve-conflict-between-boostshared-ptr-and-using-stdshared-ptr -*/ - -#ifndef BEAST_BIND_PLACEHOLDERS_N -# if BEAST_MSVC && BEAST_FUNCTIONAL_USES_STD -# define BEAST_BIND_PLACEHOLDERS_N 20 // Visual Studio 2012 -# else -# define BEAST_BIND_PLACEHOLDERS_N 8 // Seems a reasonable number -# endif -#endif - -/** Max number of arguments to bind, total. -*/ -#if BEAST_MSVC -# ifdef _VARIADIC_MAX -# define BEAST_VARIADIC_MAX _VARIADIC_MAX -# else -# define BEAST_VARIADIC_MAX 10 -# endif -#else -# define BEAST_VARIADIC_MAX 10 -#endif - -//------------------------------------------------------------------------------ - -#if BEAST_FUNCTIONAL_USES_STD - -namespace functional -{ - -using std::ref; -using std::cref; -using std::bind; - -//using std::function; - -} - -using namespace functional; - -namespace placeholders -{ - -#if BEAST_BIND_PLACEHOLDERS_N >= 1 -using std::placeholders::_1; -#endif - -#if BEAST_BIND_PLACEHOLDERS_N >= 2 -using std::placeholders::_2; -#endif - -#if BEAST_BIND_PLACEHOLDERS_N >= 3 -using std::placeholders::_3; -#endif - -#if BEAST_BIND_PLACEHOLDERS_N >= 4 -using std::placeholders::_4; -#endif - -#if BEAST_BIND_PLACEHOLDERS_N >= 5 -using std::placeholders::_5; -#endif - -#if BEAST_BIND_PLACEHOLDERS_N >= 6 -using std::placeholders::_6; -#endif - -#if BEAST_BIND_PLACEHOLDERS_N >= 7 -using std::placeholders::_7; -#endif - -#if BEAST_BIND_PLACEHOLDERS_N >= 8 -using std::placeholders::_8; -#endif - -#if BEAST_BIND_PLACEHOLDERS_N >= 9 -using std::placeholders::_9; -#endif - -#if BEAST_BIND_PLACEHOLDERS_N >= 10 -using std::placeholders::_10; -#endif - -#if BEAST_BIND_PLACEHOLDERS_N >= 11 -using std::placeholders::_11; -#endif - -#if BEAST_BIND_PLACEHOLDERS_N >= 12 -using std::placeholders::_12; -#endif - -#if BEAST_BIND_PLACEHOLDERS_N >= 13 -using std::placeholders::_13; -#endif - -#if BEAST_BIND_PLACEHOLDERS_N >= 14 -using std::placeholders::_14; -#endif - -#if BEAST_BIND_PLACEHOLDERS_N >= 15 -using std::placeholders::_15; -#endif - -#if BEAST_BIND_PLACEHOLDERS_N >= 16 -using std::placeholders::_16; -#endif - -#if BEAST_BIND_PLACEHOLDERS_N >= 17 -using std::placeholders::_17; -#endif - -#if BEAST_BIND_PLACEHOLDERS_N >= 18 -using std::placeholders::_18; -#endif - -#if BEAST_BIND_PLACEHOLDERS_N >= 19 -using std::placeholders::_19; -#endif - -#if BEAST_BIND_PLACEHOLDERS_N >= 20 -using std::placeholders::_20; -#endif - -} - -using namespace placeholders; - -//------------------------------------------------------------------------------ - -#elif BEAST_FUNCTIONAL_USES_TR1 - -namespace functional -{ - -using std::tr1::ref; -using std::tr1::cref; -using std::tr1::bind; - -//using std::tr1::function; - -} - -using namespace functional; - -namespace placeholders -{ - -#if BEAST_BIND_PLACEHOLDERS_N >= 1 -using std::tr1::placeholders::_1; -#endif - -#if BEAST_BIND_PLACEHOLDERS_N >= 2 -using std::tr1::placeholders::_2; -#endif - -#if BEAST_BIND_PLACEHOLDERS_N >= 3 -using std::tr1::placeholders::_3; -#endif - -#if BEAST_BIND_PLACEHOLDERS_N >= 4 -using std::tr1::placeholders::_4; -#endif - -#if BEAST_BIND_PLACEHOLDERS_N >= 5 -using std::tr1::placeholders::_5; -#endif - -#if BEAST_BIND_PLACEHOLDERS_N >= 6 -using std::tr1::placeholders::_6; -#endif - -#if BEAST_BIND_PLACEHOLDERS_N >= 7 -using std::tr1::placeholders::_7; -#endif - -#if BEAST_BIND_PLACEHOLDERS_N >= 8 -using std::tr1::placeholders::_8; -#endif - -#if BEAST_BIND_PLACEHOLDERS_N >= 9 -using std::tr1::placeholders::_9; -#endif - -#if BEAST_BIND_PLACEHOLDERS_N >= 10 -using std::tr1::placeholders::_10; -#endif - -#if BEAST_BIND_PLACEHOLDERS_N >= 11 -using std::tr1::placeholders::_11; -#endif - -#if BEAST_BIND_PLACEHOLDERS_N >= 12 -using std::tr1::placeholders::_12; -#endif - -#if BEAST_BIND_PLACEHOLDERS_N >= 13 -using std::tr1::placeholders::_13; -#endif - -#if BEAST_BIND_PLACEHOLDERS_N >= 14 -using std::tr1::placeholders::_14; -#endif - -#if BEAST_BIND_PLACEHOLDERS_N >= 15 -using std::tr1::placeholders::_15; -#endif - -#if BEAST_BIND_PLACEHOLDERS_N >= 16 -using std::tr1::placeholders::_16; -#endif - -#if BEAST_BIND_PLACEHOLDERS_N >= 17 -using std::tr1::placeholders::_17; -#endif - -#if BEAST_BIND_PLACEHOLDERS_N >= 18 -using std::tr1::placeholders::_18; -#endif - -#if BEAST_BIND_PLACEHOLDERS_N >= 19 -using std::tr1::placeholders::_19; -#endif - -#if BEAST_BIND_PLACEHOLDERS_N >= 20 -using std::tr1::placeholders::_20; -#endif - -} - -using namespace placeholders; - -//------------------------------------------------------------------------------ - -#elif BEAST_FUNCTIONAL_USES_BOOST - -namespace functional -{ - -using boost::ref; -using boost::cref; -using boost::bind; - -//using boost::function; - -} - -using namespace functional; - -namespace placeholders -{ - -#if BEAST_BIND_PLACEHOLDERS_N >= 1 -using boost::placeholders::_1; -#endif - -#if BEAST_BIND_PLACEHOLDERS_N >= 2 -using boost::placeholders::_2; -#endif - -#if BEAST_BIND_PLACEHOLDERS_N >= 3 -using boost::placeholders::_3; -#endif - -#if BEAST_BIND_PLACEHOLDERS_N >= 4 -using boost::placeholders::_4; -#endif - -#if BEAST_BIND_PLACEHOLDERS_N >= 5 -using boost::placeholders::_5; -#endif - -#if BEAST_BIND_PLACEHOLDERS_N >= 6 -using boost::placeholders::_6; -#endif - -#if BEAST_BIND_PLACEHOLDERS_N >= 7 -using boost::placeholders::_7; -#endif - -#if BEAST_BIND_PLACEHOLDERS_N >= 8 -using boost::placeholders::_8; -#endif - -#if BEAST_BIND_PLACEHOLDERS_N >= 9 -using boost::placeholders::_9; -#endif - -#if BEAST_BIND_PLACEHOLDERS_N >= 10 -using boost::placeholders::_10; -#endif - -#if BEAST_BIND_PLACEHOLDERS_N >= 11 -using boost::placeholders::_11; -#endif - -#if BEAST_BIND_PLACEHOLDERS_N >= 12 -using boost::placeholders::_12; -#endif - -#if BEAST_BIND_PLACEHOLDERS_N >= 13 -using boost::placeholders::_13; -#endif - -#if BEAST_BIND_PLACEHOLDERS_N >= 14 -using boost::placeholders::_14; -#endif - -#if BEAST_BIND_PLACEHOLDERS_N >= 15 -using boost::placeholders::_15; -#endif - -#if BEAST_BIND_PLACEHOLDERS_N >= 16 -using boost::placeholders::_16; -#endif - -#if BEAST_BIND_PLACEHOLDERS_N >= 17 -using boost::placeholders::_17; -#endif - -#if BEAST_BIND_PLACEHOLDERS_N >= 18 -using boost::placeholders::_18; -#endif - -#if BEAST_BIND_PLACEHOLDERS_N >= 19 -using boost::placeholders::_19; -#endif - -#if BEAST_BIND_PLACEHOLDERS_N >= 20 -using boost::placeholders::_20; -#endif - -} - -using namespace placeholders; - -//------------------------------------------------------------------------------ - -#else - -#error Unknown bind source in Functional.h - -#endif - -} // beast - -#endif diff --git a/src/beast/beast/module/core/system/FunctionalIncludes.h b/src/beast/beast/module/core/system/FunctionalIncludes.h deleted file mode 100644 index bc042832eb..0000000000 --- a/src/beast/beast/module/core/system/FunctionalIncludes.h +++ /dev/null @@ -1,54 +0,0 @@ -//------------------------------------------------------------------------------ -/* - This file is part of Beast: https://github.com/vinniefalco/Beast - Copyright 2013, Vinnie Falco - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ -//============================================================================== - -#ifndef BEAST_CORE_SYSTEM_FUNCTIONALINCLUDES_H_INCLUDED -#define BEAST_CORE_SYSTEM_FUNCTIONALINCLUDES_H_INCLUDED - -// Choose a source of bind, placeholders, and function - -#if !BEAST_FUNCTIONAL_USES_STD && !BEAST_FUNCTIONAL_USES_TR1 && !BEAST_FUNCTIONAL_USES_BOOST -# if BEAST_USE_BOOST_FEATURES -# define BEAST_FUNCTIONAL_USES_BOOST 1 -# elif BEAST_MSVC -# define BEAST_FUNCTIONAL_USES_STD 1 -# elif BEAST_IOS || BEAST_MAC -#include // detect version of std::lib -# if BEAST_IOS && BEAST_USE_BOOST_FEATURES // Work-around for iOS bugs with bind. -# define BEAST_FUNCTIONAL_USES_BOOST 1 -# elif _LIBCPP_VERSION // libc++ -# define BEAST_FUNCTIONAL_USES_STD 1 -# else // libstdc++ (GNU) -# define BEAST_FUNCTIONAL_USES_TR1 1 -# endif -# elif BEAST_LINUX || BEAST_BSD -# define BEAST_FUNCTIONAL_USES_TR1 1 -# else -# define BEAST_FUNCTIONAL_USES_STD 1 -# endif -#endif - -#if BEAST_FUNCTIONAL_USES_STD -#include -#elif BEAST_FUNCTIONAL_USES_TR1 -#include -#elif BEAST_FUNCTIONAL_USES_BOOST -// included in BoostPlaceholdersFix.h -#endif - -#endif diff --git a/src/beast/beast/module/core/text/StringArray.h b/src/beast/beast/module/core/text/StringArray.h index 5cbfe4f401..aa61c60cb1 100644 --- a/src/beast/beast/module/core/text/StringArray.h +++ b/src/beast/beast/module/core/text/StringArray.h @@ -24,6 +24,7 @@ #ifndef BEAST_STRINGARRAY_H_INCLUDED #define BEAST_STRINGARRAY_H_INCLUDED +#include #include #include diff --git a/src/beast/beast/module/core/threads/CriticalSection.h b/src/beast/beast/module/core/threads/CriticalSection.h index f66fec739e..5130c568f8 100644 --- a/src/beast/beast/module/core/threads/CriticalSection.h +++ b/src/beast/beast/module/core/threads/CriticalSection.h @@ -25,6 +25,7 @@ #define BEAST_CRITICALSECTION_H_INCLUDED #include +#include namespace beast { diff --git a/src/beast/beast/smart_ptr/ScopedPointer.h b/src/beast/beast/smart_ptr/ScopedPointer.h index aa3bd0eda2..52eb1c70d6 100644 --- a/src/beast/beast/smart_ptr/ScopedPointer.h +++ b/src/beast/beast/smart_ptr/ScopedPointer.h @@ -27,9 +27,9 @@ #include #include #include - #include - +#include + namespace beast { //============================================================================== diff --git a/src/beast/beast/unit_test/reporter.h b/src/beast/beast/unit_test/reporter.h index c206ac47ef..0503f11a1a 100644 --- a/src/beast/beast/unit_test/reporter.h +++ b/src/beast/beast/unit_test/reporter.h @@ -22,13 +22,9 @@ #include #include - #include #include - #include -#include - #include #include @@ -116,7 +112,7 @@ public: reporter& operator= (reporter const&) = delete; explicit reporter (std::ostream& stream = std::cout) - : m_std_ostream (boost::ref (stream)) + : m_std_ostream (std::ref (stream)) , m_stream (*m_std_ostream) { } diff --git a/src/ripple/common/KeyCache.h b/src/ripple/common/KeyCache.h index feea9bbf3d..32922a799b 100644 --- a/src/ripple/common/KeyCache.h +++ b/src/ripple/common/KeyCache.h @@ -23,8 +23,6 @@ #include #include -#include - #include #include #include diff --git a/src/ripple/common/TaggedCache.h b/src/ripple/common/TaggedCache.h index 6f08d55a38..752ca3ebb3 100644 --- a/src/ripple/common/TaggedCache.h +++ b/src/ripple/common/TaggedCache.h @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/src/ripple/common/impl/MultiSocketImpl.h b/src/ripple/common/impl/MultiSocketImpl.h index 6ffaaef491..448b4876b7 100644 --- a/src/ripple/common/impl/MultiSocketImpl.h +++ b/src/ripple/common/impl/MultiSocketImpl.h @@ -21,13 +21,11 @@ #define RIPPLE_COMMON_MULTISOCKETIMPL_H_INCLUDED #include - #include #include #include - #include - +#include #include #ifndef RIPPLE_MULTISOCKET_NO_ALLOCATOR diff --git a/src/ripple/common/impl/ResolverAsio.cpp b/src/ripple/common/impl/ResolverAsio.cpp index ffae95db1f..0b947ab023 100644 --- a/src/ripple/common/impl/ResolverAsio.cpp +++ b/src/ripple/common/impl/ResolverAsio.cpp @@ -17,19 +17,16 @@ */ //============================================================================== -#include +#include #include - +#include +#include +#include #include +#include #include #include -#include "boost/asio.hpp" - -#include - -#include - namespace ripple { class ResolverAsioImpl @@ -117,7 +114,7 @@ public: { if (m_stop_called.exchange (true) == false) { - m_io_service.dispatch (m_strand.wrap (boost::bind ( + m_io_service.dispatch (m_strand.wrap (std::bind ( &ResolverAsioImpl::do_stop, this, CompletionCounter (this)))); @@ -144,7 +141,7 @@ public: // TODO NIKB use rvalue references to construct and move // reducing cost. - m_io_service.dispatch (m_strand.wrap (boost::bind ( + m_io_service.dispatch (m_strand.wrap (std::bind ( &ResolverAsioImpl::do_resolve, this, names, handler, CompletionCounter (this)))); } @@ -189,7 +186,7 @@ public: handler (name, addresses); - m_io_service.post (m_strand.wrap (boost::bind ( + m_io_service.post (m_strand.wrap (std::bind ( &ResolverAsioImpl::do_work, this, CompletionCounter (this)))); } @@ -259,7 +256,7 @@ public: m_journal.error << "Unable to parse '" << name << "'"; - m_io_service.post (m_strand.wrap (boost::bind ( + m_io_service.post (m_strand.wrap (std::bind ( &ResolverAsioImpl::do_work, this, CompletionCounter (this)))); @@ -269,10 +266,10 @@ public: boost::asio::ip::tcp::resolver::query query ( hp.first, hp.second); - m_resolver.async_resolve (query, boost::bind ( + m_resolver.async_resolve (query, std::bind ( &ResolverAsioImpl::do_finish, this, name, - boost::asio::placeholders::error, handler, - boost::asio::placeholders::iterator, + beast::asio::placeholders::error, handler, + beast::asio::placeholders::iterator, CompletionCounter (this))); } @@ -291,7 +288,7 @@ public: if (m_work.size() == 1) { - m_io_service.post (m_strand.wrap (boost::bind ( + m_io_service.post (m_strand.wrap (std::bind ( &ResolverAsioImpl::do_work, this, CompletionCounter (this)))); } diff --git a/src/ripple/http/impl/Door.h b/src/ripple/http/impl/Door.h index caf30bd404..d5267b1262 100644 --- a/src/ripple/http/impl/Door.h +++ b/src/ripple/http/impl/Door.h @@ -20,6 +20,8 @@ #ifndef RIPPLE_HTTP_DOOR_H_INCLUDED #define RIPPLE_HTTP_DOOR_H_INCLUDED +#include + namespace ripple { namespace HTTP { @@ -94,9 +96,9 @@ public: void async_accept () { Peer* peer (new Peer (m_impl, m_port)); - m_acceptor.async_accept (peer->get_socket(), boost::bind ( + m_acceptor.async_accept (peer->get_socket(), std::bind ( &Door::handle_accept, Ptr(this), - boost::asio::placeholders::error, + beast::asio::placeholders::error, Peer::Ptr (peer), CompletionCounter (this))); } diff --git a/src/ripple/http/impl/Peer.h b/src/ripple/http/impl/Peer.h index 4e345da8e5..2c56564c23 100644 --- a/src/ripple/http/impl/Peer.h +++ b/src/ripple/http/impl/Peer.h @@ -22,11 +22,10 @@ #include #include - #include #include #include - +#include #include namespace ripple { @@ -186,7 +185,7 @@ public: // The work object will be destroyed with the Peer // after the Session is closed and handlers complete. // - m_work = boost::in_place (boost::ref ( + m_work = boost::in_place (std::ref ( m_impl.get_io_service())); } } diff --git a/src/ripple/http/impl/ServerImpl.cpp b/src/ripple/http/impl/ServerImpl.cpp index a8a4d3ae5e..21cbc3beed 100644 --- a/src/ripple/http/impl/ServerImpl.cpp +++ b/src/ripple/http/impl/ServerImpl.cpp @@ -26,7 +26,7 @@ ServerImpl::ServerImpl (Server& server, Handler& handler, beast::Journal journal , m_handler (handler) , m_journal (journal) , m_strand (m_io_service) - , m_work (boost::in_place (boost::ref (m_io_service))) + , m_work (boost::in_place (std::ref (m_io_service))) , m_stopped (true) { startThread (); @@ -213,7 +213,7 @@ void ServerImpl::handle_update () // void ServerImpl::update () { - m_io_service.post (m_strand.wrap (boost::bind ( + m_io_service.post (m_strand.wrap (std::bind ( &ServerImpl::handle_update, this))); } diff --git a/src/ripple/module/app/consensus/LedgerConsensus.cpp b/src/ripple/module/app/consensus/LedgerConsensus.cpp index 58289a7dd9..6dd8634055 100644 --- a/src/ripple/module/app/consensus/LedgerConsensus.cpp +++ b/src/ripple/module/app/consensus/LedgerConsensus.cpp @@ -875,7 +875,7 @@ private: Ledger::pointer newLCL = std::make_shared (false - , boost::ref (*mPreviousLedger)); + , std::ref (*mPreviousLedger)); // Set up to write SHAMap changes to our database, // perform updates, extract changes @@ -968,7 +968,7 @@ private: getApp().getLedgerMaster().consensusBuilt (newLCL); Ledger::pointer newOL = std::make_shared - (true, boost::ref (*newLCL)); + (true, std::ref (*newLCL)); LedgerMaster::ScopedLockType sl (getApp().getLedgerMaster ().peekMutex ()); @@ -987,7 +987,7 @@ private: SerializerIterator sit (it.second->peekTransaction ()); SerializedTransaction::pointer txn = std::make_shared - (boost::ref (sit)); + (std::ref (sit)); if (applyTransaction (engine, txn, newOL, true, false)) { @@ -1269,7 +1269,7 @@ private: SerializerIterator sit (item->peekSerializer ()); SerializedTransaction::pointer txn = std::make_shared - (boost::ref (sit)); + (std::ref (sit)); if (applyTransaction (engine, txn, applyLedger, openLgr, true) == resultRetry) diff --git a/src/ripple/module/app/ledger/AcceptedLedger.cpp b/src/ripple/module/app/ledger/AcceptedLedger.cpp index 65d0cf0a7a..82792b2d74 100644 --- a/src/ripple/module/app/ledger/AcceptedLedger.cpp +++ b/src/ripple/module/app/ledger/AcceptedLedger.cpp @@ -33,7 +33,7 @@ AcceptedLedger::AcceptedLedger (Ledger::ref ledger) : mLedger (ledger) for (SHAMapItem::pointer item = txSet.peekFirstItem (); !!item; item = txSet.peekNextItem (item->getTag ())) { SerializerIterator sit (item->peekSerializer ()); - insert (std::make_shared (ledger->getLedgerSeq (), boost::ref (sit))); + insert (std::make_shared (ledger->getLedgerSeq (), std::ref (sit))); } } diff --git a/src/ripple/module/app/ledger/AcceptedLedgerTx.cpp b/src/ripple/module/app/ledger/AcceptedLedgerTx.cpp index 2118612c0d..7f91dcfa46 100644 --- a/src/ripple/module/app/ledger/AcceptedLedgerTx.cpp +++ b/src/ripple/module/app/ledger/AcceptedLedgerTx.cpp @@ -24,7 +24,7 @@ AcceptedLedgerTx::AcceptedLedgerTx (std::uint32_t seq, SerializerIterator& sit) Serializer txnSer (sit.getVL ()); SerializerIterator txnIt (txnSer); - mTxn = std::make_shared (boost::ref (txnIt)); + mTxn = std::make_shared (std::ref (txnIt)); mRawMeta = sit.getVL (); mMeta = std::make_shared (mTxn->getTransactionID (), seq, mRawMeta); mAffected = mMeta->getAffectedAccounts (); diff --git a/src/ripple/module/app/ledger/Ledger.cpp b/src/ripple/module/app/ledger/Ledger.cpp index 948f68f6db..77d3939c25 100644 --- a/src/ripple/module/app/ledger/Ledger.cpp +++ b/src/ripple/module/app/ledger/Ledger.cpp @@ -469,12 +469,12 @@ SerializedTransaction::pointer Ledger::getSTransaction (SHAMapItem::ref item, SH SerializerIterator sit (item->peekSerializer ()); if (type == SHAMapTreeNode::tnTRANSACTION_NM) - return std::make_shared (boost::ref (sit)); + return std::make_shared (std::ref (sit)); else if (type == SHAMapTreeNode::tnTRANSACTION_MD) { Serializer sTxn (sit.getVL ()); SerializerIterator tSit (sTxn); - return std::make_shared (boost::ref (tSit)); + return std::make_shared (std::ref (tSit)); } return SerializedTransaction::pointer (); @@ -488,7 +488,7 @@ SerializedTransaction::pointer Ledger::getSMTransaction (SHAMapItem::ref item, S if (type == SHAMapTreeNode::tnTRANSACTION_NM) { txMeta.reset (); - return std::make_shared (boost::ref (sit)); + return std::make_shared (std::ref (sit)); } else if (type == SHAMapTreeNode::tnTRANSACTION_MD) { @@ -496,7 +496,7 @@ SerializedTransaction::pointer Ledger::getSMTransaction (SHAMapItem::ref item, S SerializerIterator tSit (sTxn); txMeta = std::make_shared (item->getTag (), mLedgerSeq, sit.getVL ()); - return std::make_shared (boost::ref (tSit)); + return std::make_shared (std::ref (tSit)); } txMeta.reset (); diff --git a/src/ripple/module/app/ledger/OrderBookDB.cpp b/src/ripple/module/app/ledger/OrderBookDB.cpp index 1b8f77d319..9b1a30ac27 100644 --- a/src/ripple/module/app/ledger/OrderBookDB.cpp +++ b/src/ripple/module/app/ledger/OrderBookDB.cpp @@ -82,8 +82,8 @@ static void updateHelper (SLE::ref entry, if (seen.insert (index).second) { // VFALCO TODO Reduce the clunkiness of these parameter wrappers - OrderBook::pointer book = std::make_shared (boost::cref (index), - boost::cref (ci), boost::cref (co), boost::cref (ii), boost::cref (io)); + OrderBook::pointer book = std::make_shared (std::cref (index), + std::cref (ci), std::cref (co), std::cref (ii), std::cref (io)); sourceMap[RippleAssetRef (ci, ii)].push_back (book); destMap[RippleAssetRef (co, io)].push_back (book); @@ -109,8 +109,8 @@ void OrderBookDB::update (Ledger::pointer ledger) try { ledger->visitStateItems(std::bind(&updateHelper, std::placeholders::_1, - boost::ref(seen), boost::ref(destMap), - boost::ref(sourceMap), boost::ref(XRPBooks), boost::ref(books))); + std::ref(seen), std::ref(destMap), + std::ref(sourceMap), std::ref(XRPBooks), std::ref(books))); } catch (const SHAMapMissingNode&) { @@ -155,8 +155,8 @@ void OrderBookDB::addOrderBook(const uint160& ci, const uint160& co, } uint256 index = Ledger::getBookBase(ci, ii, co, io); - OrderBook::pointer book = std::make_shared (boost::cref (index), - boost::cref (ci), boost::cref (co), boost::cref (ii), boost::cref (io)); + OrderBook::pointer book = std::make_shared (std::cref (index), + std::cref (ci), std::cref (co), std::cref (ii), std::cref (io)); mSourceMap[RippleAssetRef (ci, ii)].push_back (book); mDestMap[RippleAssetRef (co, io)].push_back (book); diff --git a/src/ripple/module/app/main/Application.cpp b/src/ripple/module/app/main/Application.cpp index 61b8586332..1c3742c3ed 100644 --- a/src/ripple/module/app/main/Application.cpp +++ b/src/ripple/module/app/main/Application.cpp @@ -17,19 +17,19 @@ */ //============================================================================== +#include #include - -#include -#include +#include #include -#include +#include #include #include #include #include - +#include #include - +#include + namespace ripple { // VFALCO TODO Clean this global up @@ -1070,25 +1070,25 @@ public: m_fullBelowCache->sweep (); - logTimedCall (m_journal.warning, "TransactionMaster::sweep", __FILE__, __LINE__, boost::bind ( + logTimedCall (m_journal.warning, "TransactionMaster::sweep", __FILE__, __LINE__, std::bind ( &TransactionMaster::sweep, &m_txMaster)); - logTimedCall (m_journal.warning, "NodeStore::sweep", __FILE__, __LINE__, boost::bind ( + logTimedCall (m_journal.warning, "NodeStore::sweep", __FILE__, __LINE__, std::bind ( &NodeStore::Database::sweep, m_nodeStore.get ())); - logTimedCall (m_journal.warning, "LedgerMaster::sweep", __FILE__, __LINE__, boost::bind ( + logTimedCall (m_journal.warning, "LedgerMaster::sweep", __FILE__, __LINE__, std::bind ( &LedgerMaster::sweep, m_ledgerMaster.get())); - logTimedCall (m_journal.warning, "TempNodeCache::sweep", __FILE__, __LINE__, boost::bind ( + logTimedCall (m_journal.warning, "TempNodeCache::sweep", __FILE__, __LINE__, std::bind ( &NodeCache::sweep, &m_tempNodeCache)); - logTimedCall (m_journal.warning, "Validations::sweep", __FILE__, __LINE__, boost::bind ( + logTimedCall (m_journal.warning, "Validations::sweep", __FILE__, __LINE__, std::bind ( &Validations::sweep, mValidations.get ())); - logTimedCall (m_journal.warning, "InboundLedgers::sweep", __FILE__, __LINE__, boost::bind ( + logTimedCall (m_journal.warning, "InboundLedgers::sweep", __FILE__, __LINE__, std::bind ( &InboundLedgers::sweep, &getInboundLedgers ())); - logTimedCall (m_journal.warning, "SLECache::sweep", __FILE__, __LINE__, boost::bind ( + logTimedCall (m_journal.warning, "SLECache::sweep", __FILE__, __LINE__, std::bind ( &SLECache::sweep, &m_sleCache)); logTimedCall (m_journal.warning, "AcceptedLedger::sweep", __FILE__, __LINE__, @@ -1097,7 +1097,7 @@ public: logTimedCall (m_journal.warning, "SHAMap::sweep", __FILE__, __LINE__, &SHAMap::sweep); - logTimedCall (m_journal.warning, "NetworkOPs::sweepFetchPack", __FILE__, __LINE__, boost::bind ( + logTimedCall (m_journal.warning, "NetworkOPs::sweepFetchPack", __FILE__, __LINE__, std::bind ( &NetworkOPs::sweepFetchPack, m_networkOPs.get ())); // VFALCO NOTE does the call to sweep() happen on another thread? @@ -1137,10 +1137,10 @@ void ApplicationImp::startNewLedger () firstLedger->setAccepted (); m_ledgerMaster->pushLedger (firstLedger); - Ledger::pointer secondLedger = std::make_shared (true, boost::ref (*firstLedger)); + Ledger::pointer secondLedger = std::make_shared (true, std::ref (*firstLedger)); secondLedger->setClosed (); secondLedger->setAccepted (); - m_ledgerMaster->pushLedger (secondLedger, std::make_shared (true, boost::ref (*secondLedger))); + m_ledgerMaster->pushLedger (secondLedger, std::make_shared (true, std::ref (*secondLedger))); assert (!!secondLedger->getAccountState (rootAddress)); m_networkOPs->setLastCloseTime (secondLedger->getCloseTimeNC ()); } @@ -1300,7 +1300,7 @@ bool ApplicationImp::loadOldLedger ( m_ledgerMaster->setLedgerRangePresent (loadLedger->getLedgerSeq (), loadLedger->getLedgerSeq ()); - Ledger::pointer openLedger = std::make_shared (false, boost::ref (*loadLedger)); + Ledger::pointer openLedger = std::make_shared (false, std::ref (*loadLedger)); m_ledgerMaster->switchLedgers (loadLedger, openLedger); m_ledgerMaster->forceValid(loadLedger); m_networkOPs->setLastCloseTime (loadLedger->getCloseTimeNC ()); diff --git a/src/ripple/module/app/main/CollectorManager.cpp b/src/ripple/module/app/main/CollectorManager.cpp index 1a8a265823..9975708a45 100644 --- a/src/ripple/module/app/main/CollectorManager.cpp +++ b/src/ripple/module/app/main/CollectorManager.cpp @@ -17,6 +17,8 @@ */ //============================================================================== +#include + namespace ripple { class CollectorManagerImp diff --git a/src/ripple/module/app/main/CollectorManager.h b/src/ripple/module/app/main/CollectorManager.h index a3c6a9407a..e85adca528 100644 --- a/src/ripple/module/app/main/CollectorManager.h +++ b/src/ripple/module/app/main/CollectorManager.h @@ -20,6 +20,7 @@ #ifndef RIPPLE_RIPPLECOLLECTOR_H_INCLUDED #define RIPPLE_RIPPLECOLLECTOR_H_INCLUDED +#include #include namespace ripple { diff --git a/src/ripple/module/app/main/FatalErrorReporter.cpp b/src/ripple/module/app/main/FatalErrorReporter.cpp index eb29e29fa3..2d5bf2682d 100644 --- a/src/ripple/module/app/main/FatalErrorReporter.cpp +++ b/src/ripple/module/app/main/FatalErrorReporter.cpp @@ -17,6 +17,8 @@ */ //============================================================================== +#include +#include #include namespace ripple { diff --git a/src/ripple/module/app/main/IoServicePool.cpp b/src/ripple/module/app/main/IoServicePool.cpp index d3a4cfd233..599a8d72f8 100644 --- a/src/ripple/module/app/main/IoServicePool.cpp +++ b/src/ripple/module/app/main/IoServicePool.cpp @@ -17,6 +17,8 @@ */ //============================================================================== +#include +#include #include // namespace ripple { @@ -25,7 +27,7 @@ class IoServicePool::ServiceThread : private beast::Thread { public: explicit ServiceThread ( - beast::String const& name, + std::string const& name, IoServicePool& owner, boost::asio::io_service& service) : Thread (name) @@ -60,12 +62,12 @@ private: //------------------------------------------------------------------------------ -IoServicePool::IoServicePool (Stoppable& parent, beast::String const& name, +IoServicePool::IoServicePool (Stoppable& parent, std::string const& name, int numberOfThreads) - : Stoppable (name.toStdString().c_str(), parent) + : Stoppable (name.c_str(), parent) , m_name (name) , m_service (numberOfThreads) - , m_work (boost::ref (m_service)) + , m_work (std::ref (m_service)) , m_threadsDesired (numberOfThreads) { bassert (m_threadsDesired > 0); diff --git a/src/ripple/module/app/main/IoServicePool.h b/src/ripple/module/app/main/IoServicePool.h index 3bcc89044b..9848382a0c 100644 --- a/src/ripple/module/app/main/IoServicePool.h +++ b/src/ripple/module/app/main/IoServicePool.h @@ -20,13 +20,17 @@ #ifndef RIPPLE_APP_IOSERVICEPOOL_H_INCLUDED #define RIPPLE_APP_IOSERVICEPOOL_H_INCLUDED +#include +#include +#include + namespace ripple { /** An io_service with an associated group of threads. */ class IoServicePool : public beast::Stoppable { public: - IoServicePool (Stoppable& parent, beast::String const& name, int numberOfThreads); + IoServicePool (Stoppable& parent, std::string const& name, int numberOfThreads); ~IoServicePool (); boost::asio::io_service& getService (); @@ -41,7 +45,7 @@ private: void onThreadExit(); - beast::String m_name; + std::string m_name; boost::asio::io_service m_service; boost::optional m_work; std::vector > m_threads; diff --git a/src/ripple/module/app/main/LoadManager.cpp b/src/ripple/module/app/main/LoadManager.cpp index 5f98cee1e1..77e93c4801 100644 --- a/src/ripple/module/app/main/LoadManager.cpp +++ b/src/ripple/module/app/main/LoadManager.cpp @@ -147,17 +147,6 @@ public: void logDeadlock (int dlTime) { m_journal.warning << "Server stalled for " << dlTime << " seconds."; - -#if RIPPLE_TRACK_MUTEXES - StringArray report; - TrackedMutex::generateGlobalBlockedReport (report); - if (report.size () > 0) - { - report.insert (0, String::empty); - report.insert (-1, String::empty); - Log::print (report); - } -#endif } // VFALCO NOTE Where's the thread object? It's not a data member... diff --git a/src/ripple/module/app/main/LocalCredentials.h b/src/ripple/module/app/main/LocalCredentials.h index 2e00d7edce..1691882ea6 100644 --- a/src/ripple/module/app/main/LocalCredentials.h +++ b/src/ripple/module/app/main/LocalCredentials.h @@ -57,7 +57,7 @@ private: bool nodeIdentityCreate (); private: - boost::recursive_mutex mLock; + std::recursive_mutex mLock; RippleAddress mNodePublicKey; RippleAddress mNodePrivateKey; diff --git a/src/ripple/module/app/main/NodeStoreScheduler.cpp b/src/ripple/module/app/main/NodeStoreScheduler.cpp index 6f8f0b5af9..43e2ad1976 100644 --- a/src/ripple/module/app/main/NodeStoreScheduler.cpp +++ b/src/ripple/module/app/main/NodeStoreScheduler.cpp @@ -17,6 +17,8 @@ */ //============================================================================== +#include + namespace ripple { NodeStoreScheduler::NodeStoreScheduler (Stoppable& parent) @@ -48,7 +50,7 @@ void NodeStoreScheduler::scheduleTask (NodeStore::Task& task) jtWRITE, "NodeObject::store", std::bind (&NodeStoreScheduler::doTask, - this, boost::ref(task), std::placeholders::_1)); + this, std::ref(task), std::placeholders::_1)); } void NodeStoreScheduler::doTask (NodeStore::Task& task, Job&) diff --git a/src/ripple/module/app/main/NodeStoreScheduler.h b/src/ripple/module/app/main/NodeStoreScheduler.h index 37acef98a8..a016ddd70c 100644 --- a/src/ripple/module/app/main/NodeStoreScheduler.h +++ b/src/ripple/module/app/main/NodeStoreScheduler.h @@ -21,7 +21,9 @@ #define RIPPLE_APP_NODESTORESCHEDULER_H_INCLUDED #include +#include #include +#include namespace ripple { diff --git a/src/ripple/module/app/main/RPCHTTPServer.cpp b/src/ripple/module/app/main/RPCHTTPServer.cpp index 9f3a2f19bf..54cdbb07a3 100644 --- a/src/ripple/module/app/main/RPCHTTPServer.cpp +++ b/src/ripple/module/app/main/RPCHTTPServer.cpp @@ -17,6 +17,9 @@ */ //============================================================================== +#include +#include +#include #include namespace ripple { @@ -137,9 +140,9 @@ public: // The "boost::"'s are a workaround for broken versions of tr1::functional that // require the reference wrapper to be callable. HTTP::Session has abstract functions // and so references to it are not callable. - m_jobQueue.addJob (jtRPC, "RPC", boost::bind ( - &RPCHTTPServerImp::processSession, this, boost::_1, - boost::ref (session))); + m_jobQueue.addJob (jtRPC, "RPC", std::bind ( + &RPCHTTPServerImp::processSession, this, std::placeholders::_1, + std::ref (session))); #endif } diff --git a/src/ripple/module/app/misc/NetworkOPs.cpp b/src/ripple/module/app/misc/NetworkOPs.cpp index 2b04c1d99d..871a4ed4c3 100644 --- a/src/ripple/module/app/misc/NetworkOPs.cpp +++ b/src/ripple/module/app/misc/NetworkOPs.cpp @@ -757,7 +757,7 @@ void NetworkOPsImp::submitTransaction (Job&, SerializedTransaction::pointer iTra iTrans->add (s); SerializerIterator sit (s); - SerializedTransaction::pointer trans = std::make_shared (boost::ref (sit)); + SerializedTransaction::pointer trans = std::make_shared (std::ref (sit)); uint256 suppress = trans->getTransactionID (); int flags; @@ -1431,7 +1431,7 @@ void NetworkOPsImp::switchLastClosedLedger (Ledger::pointer newLedger, bool duri clearNeedNetworkLedger (); newLedger->setClosed (); - Ledger::pointer openLedger = std::make_shared (false, boost::ref (*newLedger)); + Ledger::pointer openLedger = std::make_shared (false, std::ref (*newLedger)); m_ledgerMaster.switchLedgers (newLedger, openLedger); protocol::TMStatusChange s; diff --git a/src/ripple/module/app/misc/SerializedLedger.cpp b/src/ripple/module/app/misc/SerializedLedger.cpp index 90b3628083..d44d080017 100644 --- a/src/ripple/module/app/misc/SerializedLedger.cpp +++ b/src/ripple/module/app/misc/SerializedLedger.cpp @@ -86,7 +86,7 @@ SerializedLedgerEntry::SerializedLedgerEntry (LedgerEntryType type, uint256 cons SerializedLedgerEntry::pointer SerializedLedgerEntry::getMutable () const { - SerializedLedgerEntry::pointer ret = std::make_shared (boost::cref (*this)); + SerializedLedgerEntry::pointer ret = std::make_shared (std::cref (*this)); ret->mMutable = true; return ret; } diff --git a/src/ripple/module/app/node/SqliteFactory.cpp b/src/ripple/module/app/node/SqliteFactory.cpp index c1c64445df..45af04dd9f 100644 --- a/src/ripple/module/app/node/SqliteFactory.cpp +++ b/src/ripple/module/app/node/SqliteFactory.cpp @@ -17,6 +17,8 @@ */ //============================================================================== +#include + namespace ripple { static const char* s_nodeStoreDBInit [] = diff --git a/src/ripple/module/app/paths/RippleLineCache.cpp b/src/ripple/module/app/paths/RippleLineCache.cpp index 3717d49f09..a131f9bd4b 100644 --- a/src/ripple/module/app/paths/RippleLineCache.cpp +++ b/src/ripple/module/app/paths/RippleLineCache.cpp @@ -32,7 +32,7 @@ AccountItems& RippleLineCache::getRippleLines (const uint160& accountID) if (it == mRLMap.end ()) it = mRLMap.insert (std::make_pair (accountID, std::make_shared - (boost::cref (accountID), boost::cref (mLedger), AccountItem::pointer (new RippleState ())))).first; + (std::cref (accountID), std::cref (mLedger), AccountItem::pointer (new RippleState ())))).first; return *it->second; } diff --git a/src/ripple/module/app/peers/PeerSet.cpp b/src/ripple/module/app/peers/PeerSet.cpp index ad19e03b8e..b277763df3 100644 --- a/src/ripple/module/app/peers/PeerSet.cpp +++ b/src/ripple/module/app/peers/PeerSet.cpp @@ -17,7 +17,8 @@ */ //============================================================================== -#include +#include +#include namespace ripple { @@ -72,7 +73,7 @@ void PeerSet::badPeer (Peer::ptr const& ptr) void PeerSet::setTimer () { mTimer.expires_from_now (boost::posix_time::milliseconds (mTimerInterval)); - mTimer.async_wait (boost::bind (&PeerSet::TimerEntry, pmDowncast (), boost::asio::placeholders::error)); + mTimer.async_wait (std::bind (&PeerSet::TimerEntry, pmDowncast (), beast::asio::placeholders::error)); } void PeerSet::invokeOnTimer () diff --git a/src/ripple/module/app/rpc/RPCHandler.cpp b/src/ripple/module/app/rpc/RPCHandler.cpp index 5dc6ec848d..a72bfdc3f8 100644 --- a/src/ripple/module/app/rpc/RPCHandler.cpp +++ b/src/ripple/module/app/rpc/RPCHandler.cpp @@ -17,6 +17,11 @@ */ //============================================================================== +#include +#include +#include +#include + namespace ripple { // diff --git a/src/ripple/module/app/rpc/RPCServerHandler.cpp b/src/ripple/module/app/rpc/RPCServerHandler.cpp index 75510b25e7..70107b010d 100644 --- a/src/ripple/module/app/rpc/RPCServerHandler.cpp +++ b/src/ripple/module/app/rpc/RPCServerHandler.cpp @@ -17,6 +17,10 @@ */ //============================================================================== +#include +#include +#include + namespace ripple { RPCServerHandler::RPCServerHandler (NetworkOPs& networkOPs, Resource::Manager& resourceManager) diff --git a/src/ripple/module/app/shamap/SHAMap.cpp b/src/ripple/module/app/shamap/SHAMap.cpp index aebc766ba1..c8b67f5b23 100644 --- a/src/ripple/module/app/shamap/SHAMap.cpp +++ b/src/ripple/module/app/shamap/SHAMap.cpp @@ -345,7 +345,7 @@ SHAMapTreeNode* SHAMap::getNodePointerNT (const SHAMapNode& id, uint256 const& h if (filter->haveNode (id, hash, nodeData)) { SHAMapTreeNode::pointer node = std::make_shared ( - boost::cref (id), boost::cref (nodeData), 0, snfPREFIX, boost::cref (hash), true); + std::cref (id), std::cref (nodeData), 0, snfPREFIX, std::cref (hash), true); canonicalize (hash, node); // Canonicalize the node with mTNByID to make sure all threads gets the same node @@ -933,7 +933,7 @@ SHAMapTreeNode* SHAMap::getNodeAsync ( if (filter->haveNode (id, hash, nodeData)) { ptr = std::make_shared ( - boost::cref (id), boost::cref (nodeData), 0, snfPREFIX, boost::cref (hash), true); + std::cref (id), std::cref (nodeData), 0, snfPREFIX, std::cref (hash), true); filter->gotNode (true, id, hash, nodeData, ptr->getType ()); } } diff --git a/src/ripple/module/app/shamap/SHAMap.h b/src/ripple/module/app/shamap/SHAMap.h index 5effbd1221..6ce18e2030 100644 --- a/src/ripple/module/app/shamap/SHAMap.h +++ b/src/ripple/module/app/shamap/SHAMap.h @@ -23,6 +23,9 @@ #include #include #include +#include +#include +#include #include diff --git a/src/ripple/module/app/shamap/SHAMapSync.cpp b/src/ripple/module/app/shamap/SHAMapSync.cpp index 8e804a7949..f4ced71d84 100644 --- a/src/ripple/module/app/shamap/SHAMapSync.cpp +++ b/src/ripple/module/app/shamap/SHAMapSync.cpp @@ -630,7 +630,7 @@ std::list SHAMap::getFetchPack (SHAMap* have, bool inc { std::list ret; getFetchPack (have, includeLeaves, max, - std::bind (addFPtoList, boost::ref (ret), + std::bind (addFPtoList, std::ref (ret), std::placeholders::_1, std::placeholders::_2)); return ret; } @@ -665,7 +665,7 @@ void SHAMap::getFetchPack (SHAMap* have, bool includeLeaves, int max, { Serializer s; root->addRaw (s, snfPREFIX); - func (boost::cref(root->getNodeHash ()), boost::cref(s.peekData ())); + func (std::cref(root->getNodeHash ()), std::cref(s.peekData ())); --max; } @@ -683,7 +683,7 @@ void SHAMap::getFetchPack (SHAMap* have, bool includeLeaves, int max, // 1) Add this node to the pack Serializer s; node->addRaw (s, snfPREFIX); - func (boost::cref(node->getNodeHash ()), boost::cref(s.peekData ())); + func (std::cref(node->getNodeHash ()), std::cref(s.peekData ())); --max; // 2) push non-matching child inner nodes @@ -705,7 +705,7 @@ void SHAMap::getFetchPack (SHAMap* have, bool includeLeaves, int max, { Serializer s; next->addRaw (s, snfPREFIX); - func (boost::cref(childHash), boost::cref(s.peekData ())); + func (std::cref(childHash), std::cref(s.peekData ())); --max; } } diff --git a/src/ripple/module/app/shamap/SHAMapSyncFilters.cpp b/src/ripple/module/app/shamap/SHAMapSyncFilters.cpp index b5da9863e3..c5d4eae0b3 100644 --- a/src/ripple/module/app/shamap/SHAMapSyncFilters.cpp +++ b/src/ripple/module/app/shamap/SHAMapSyncFilters.cpp @@ -43,7 +43,7 @@ void ConsensusTransSetSF::gotNode (bool fromFilter, const SHAMapNode& id, uint25 { Serializer s (nodeData.begin () + 4, nodeData.end ()); // skip prefix SerializerIterator sit (s); - SerializedTransaction::pointer stx = std::make_shared (boost::ref (sit)); + SerializedTransaction::pointer stx = std::make_shared (std::ref (sit)); assert (stx->getTransactionID () == nodeHash); getApp().getJobQueue ().addJob ( jtTRANSACTION, "TXS->TXN", diff --git a/src/ripple/module/app/tx/Transaction.cpp b/src/ripple/module/app/tx/Transaction.cpp index 838bafee20..7352d4cdcf 100644 --- a/src/ripple/module/app/tx/Transaction.cpp +++ b/src/ripple/module/app/tx/Transaction.cpp @@ -44,7 +44,7 @@ Transaction::pointer Transaction::sharedTransaction (Blob const& vucTransaction, Serializer s (vucTransaction); SerializerIterator sit (s); - SerializedTransaction::pointer st = std::make_shared (boost::ref (sit)); + SerializedTransaction::pointer st = std::make_shared (std::ref (sit)); return std::make_shared (st, bValidate); } @@ -158,7 +158,7 @@ Transaction::pointer Transaction::transactionFromSQL (Database* db, bool bValida rawTxn.resize (txSize); SerializerIterator it (rawTxn); - SerializedTransaction::pointer txn = std::make_shared (boost::ref (it)); + SerializedTransaction::pointer txn = std::make_shared (std::ref (it)); Transaction::pointer tr = std::make_shared (txn, bValidate); TransStatus st (INVALID); @@ -229,7 +229,7 @@ Transaction::pointer Transaction::transactionFromSQL (const std::string& sql) rawTxn.resize (txSize); SerializerIterator it (rawTxn); - SerializedTransaction::pointer txn = std::make_shared (boost::ref (it)); + SerializedTransaction::pointer txn = std::make_shared (std::ref (it)); Transaction::pointer tr = std::make_shared (txn, true); TransStatus st (INVALID); diff --git a/src/ripple/module/app/tx/TransactionMaster.cpp b/src/ripple/module/app/tx/TransactionMaster.cpp index 8eed7494c9..740859a704 100644 --- a/src/ripple/module/app/tx/TransactionMaster.cpp +++ b/src/ripple/module/app/tx/TransactionMaster.cpp @@ -66,7 +66,7 @@ SerializedTransaction::pointer TransactionMaster::fetch (SHAMapItem::ref item, if (type == SHAMapTreeNode::tnTRANSACTION_NM) { SerializerIterator sit (item->peekSerializer ()); - txn = std::make_shared (boost::ref (sit)); + txn = std::make_shared (std::ref (sit)); } else if (type == SHAMapTreeNode::tnTRANSACTION_MD) { @@ -75,7 +75,7 @@ SerializedTransaction::pointer TransactionMaster::fetch (SHAMapItem::ref item, item->peekSerializer ().getVL (s.modData (), 0, length); SerializerIterator sit (s); - txn = std::make_shared (boost::ref (sit)); + txn = std::make_shared (std::ref (sit)); } } else diff --git a/src/ripple/module/app/tx/TxQueue.cpp b/src/ripple/module/app/tx/TxQueue.cpp index 187537cbd1..d36f806508 100644 --- a/src/ripple/module/app/tx/TxQueue.cpp +++ b/src/ripple/module/app/tx/TxQueue.cpp @@ -17,6 +17,11 @@ */ //============================================================================== +#include +#include +#include +#include + namespace ripple { class TxQueueImp diff --git a/src/ripple/module/app/websocket/WSConnection.cpp b/src/ripple/module/app/websocket/WSConnection.cpp index 860ef54ae1..f39145ead9 100644 --- a/src/ripple/module/app/websocket/WSConnection.cpp +++ b/src/ripple/module/app/websocket/WSConnection.cpp @@ -17,6 +17,8 @@ */ //============================================================================== +#include + namespace ripple { SETUP_LOGN (WSConnection, "WSConnection") diff --git a/src/ripple/module/app/websocket/WSConnection.h b/src/ripple/module/app/websocket/WSConnection.h index 87b50f5742..006a8e6776 100644 --- a/src/ripple/module/app/websocket/WSConnection.h +++ b/src/ripple/module/app/websocket/WSConnection.h @@ -20,6 +20,8 @@ #ifndef RIPPLE_WSCONNECTION_H #define RIPPLE_WSCONNECTION_H +#include + namespace ripple { /** A Ripple WebSocket connection handler. @@ -146,7 +148,7 @@ public: connection_ptr ptr = m_connection.lock (); if (ptr) - m_io_service.dispatch (ptr->get_strand ().wrap (boost::bind ( + m_io_service.dispatch (ptr->get_strand ().wrap (std::bind ( &WSConnectionType ::handle_disconnect, m_connection))); } @@ -193,8 +195,8 @@ public: (getConfig ().WEBSOCKET_PING_FREQ)); m_pingTimer.async_wait (ptr->get_strand ().wrap ( - boost::bind (&WSConnectionType ::pingTimer, - m_connection, &m_serverHandler, boost::asio::placeholders::error))); + std::bind (&WSConnectionType ::pingTimer, + m_connection, &m_serverHandler, beast::asio::placeholders::error))); } } diff --git a/src/ripple/module/app/websocket/WSDoor.cpp b/src/ripple/module/app/websocket/WSDoor.cpp index 5990b4929d..5fd50a0cde 100644 --- a/src/ripple/module/app/websocket/WSDoor.cpp +++ b/src/ripple/module/app/websocket/WSDoor.cpp @@ -17,6 +17,7 @@ */ //============================================================================== +#include #include // namespace ripple { diff --git a/src/ripple/module/app/websocket/WSServerHandler.cpp b/src/ripple/module/app/websocket/WSServerHandler.cpp index 740accd7f5..2f755da510 100644 --- a/src/ripple/module/app/websocket/WSServerHandler.cpp +++ b/src/ripple/module/app/websocket/WSServerHandler.cpp @@ -17,6 +17,8 @@ */ //============================================================================== +#include + namespace ripple { SETUP_LOGN (WSServerHandlerLog,"WSServerHandler") diff --git a/src/ripple/module/app/websocket/WSServerHandler.h b/src/ripple/module/app/websocket/WSServerHandler.h index 0606d4a2ce..d7a9a93612 100644 --- a/src/ripple/module/app/websocket/WSServerHandler.h +++ b/src/ripple/module/app/websocket/WSServerHandler.h @@ -20,6 +20,8 @@ #ifndef RIPPLE_WSSERVERHANDLER_H_INCLUDED #define RIPPLE_WSSERVERHANDLER_H_INCLUDED +#include + namespace ripple { extern bool serverOkay (std::string& reason); @@ -194,8 +196,8 @@ public: { std::pair const result ( mMap.emplace (cpClient, - std::make_shared < WSConnectionType > (boost::ref(m_resourceManager), - boost::ref (m_source), boost::ref(*this), boost::cref(cpClient)))); + std::make_shared < WSConnectionType > (std::ref(m_resourceManager), + std::ref (m_source), std::ref(*this), std::cref(cpClient)))); assert (result.second); WriteLog (lsDEBUG, WSServerHandlerLog) << "Ws:: on_open(" << cpClient->get_socket ().remote_endpoint ().to_string () << ")"; diff --git a/src/ripple/module/basics/containers/RangeSet.cpp b/src/ripple/module/basics/containers/RangeSet.cpp index 5f2b0bb2e4..beb1a67e0a 100644 --- a/src/ripple/module/basics/containers/RangeSet.cpp +++ b/src/ripple/module/basics/containers/RangeSet.cpp @@ -17,8 +17,12 @@ */ //============================================================================== +#include +#include #include #include +#include +#include namespace ripple { diff --git a/src/ripple/module/basics/containers/RangeSet.h b/src/ripple/module/basics/containers/RangeSet.h index a7549b58a4..6c94e04515 100644 --- a/src/ripple/module/basics/containers/RangeSet.h +++ b/src/ripple/module/basics/containers/RangeSet.h @@ -20,6 +20,11 @@ #ifndef RIPPLE_RANGESET_H_INCLUDED #define RIPPLE_RANGESET_H_INCLUDED +#include +#include +#include +#include + namespace ripple { /** A sparse set of integers. */ diff --git a/src/ripple/module/basics/log/Log.h b/src/ripple/module/basics/log/Log.h index 3c1bc08f2d..ce016beaa1 100644 --- a/src/ripple/module/basics/log/Log.h +++ b/src/ripple/module/basics/log/Log.h @@ -20,6 +20,10 @@ #ifndef RIPPLE_BASICS_LOG_H_INCLUDED #define RIPPLE_BASICS_LOG_H_INCLUDED +#include +#include +#include + namespace ripple { /** RAII helper for writing to the LogSink. */ diff --git a/src/ripple/module/basics/log/LogFile.cpp b/src/ripple/module/basics/log/LogFile.cpp index 2062083e73..c3b6aa8bc0 100644 --- a/src/ripple/module/basics/log/LogFile.cpp +++ b/src/ripple/module/basics/log/LogFile.cpp @@ -18,7 +18,8 @@ //============================================================================== #include // - +#include + namespace ripple { LogFile::LogFile () diff --git a/src/ripple/module/basics/log/LogFile.h b/src/ripple/module/basics/log/LogFile.h index e758c3bfed..06865028d8 100644 --- a/src/ripple/module/basics/log/LogFile.h +++ b/src/ripple/module/basics/log/LogFile.h @@ -20,6 +20,9 @@ #ifndef RIPPLE_BASICS_LOGFILE_H_INCLUDED #define RIPPLE_BASICS_LOGFILE_H_INCLUDED +#include +#include + namespace ripple { /** Manages a system file containing logged output. @@ -32,7 +35,7 @@ namespace ripple { @note None of the listed interfaces are thread-safe. */ -class LogFile : public beast::Uncopyable +class LogFile { public: /** Construct with no associated system file. diff --git a/src/ripple/module/basics/log/LogPartition.h b/src/ripple/module/basics/log/LogPartition.h index c464df5b66..46f4a87382 100644 --- a/src/ripple/module/basics/log/LogPartition.h +++ b/src/ripple/module/basics/log/LogPartition.h @@ -23,6 +23,8 @@ #include #include #include +#include +#include namespace ripple { diff --git a/src/ripple/module/basics/log/LogSink.cpp b/src/ripple/module/basics/log/LogSink.cpp index f58893fda7..83f21fa6c2 100644 --- a/src/ripple/module/basics/log/LogSink.cpp +++ b/src/ripple/module/basics/log/LogSink.cpp @@ -18,6 +18,7 @@ //============================================================================== #include +#include namespace ripple { diff --git a/src/ripple/module/basics/log/LogSink.h b/src/ripple/module/basics/log/LogSink.h index fdeed213e1..da99d45058 100644 --- a/src/ripple/module/basics/log/LogSink.h +++ b/src/ripple/module/basics/log/LogSink.h @@ -20,8 +20,11 @@ #ifndef RIPPLE_BASICS_LOGSINK_H_INCLUDED #define RIPPLE_BASICS_LOGSINK_H_INCLUDED +#include #include #include +#include +#include namespace ripple { @@ -81,7 +84,7 @@ public: static Ptr get (); private: - typedef RippleRecursiveMutex LockType; + typedef std::recursive_mutex LockType; typedef std::lock_guard ScopedLockType; enum diff --git a/src/ripple/module/basics/system/BoostIncludes.h b/src/ripple/module/basics/system/BoostIncludes.h index 416e231e13..706ed242ca 100644 --- a/src/ripple/module/basics/system/BoostIncludes.h +++ b/src/ripple/module/basics/system/BoostIncludes.h @@ -20,26 +20,11 @@ #ifndef RIPPLE_BOOSTINCLUDES_H_INCLUDED #define RIPPLE_BOOSTINCLUDES_H_INCLUDED -// All Boost includes used throughout Ripple. -// -// This shows all the dependencies in one place. Please do not add -// boost includes anywhere else in the source code. If possible, do -// not add any more includes. -// - -// This is better than setting it in some Makefile or IDE Project file. -// #define BOOST_FILESYSTEM_NO_DEPRECATED -#include #include -#include #include #include -#include -#include -#include -#include // work-around for broken #include diff --git a/src/ripple/module/basics/types/BasicTypes.h b/src/ripple/module/basics/types/BasicTypes.h index 7a8d2c475d..c1a12047f7 100644 --- a/src/ripple/module/basics/types/BasicTypes.h +++ b/src/ripple/module/basics/types/BasicTypes.h @@ -20,16 +20,18 @@ #ifndef RIPPLE_BASICTYPES_H #define RIPPLE_BASICTYPES_H +#include + namespace ripple { /** Synchronization primitives. This lets us switch between tracked and untracked mutexes. */ typedef std::mutex RippleMutex; -typedef boost::recursive_mutex RippleRecursiveMutex; +typedef std::recursive_mutex RippleRecursiveMutex; -typedef boost::recursive_mutex DeprecatedRecursiveMutex; -typedef DeprecatedRecursiveMutex::scoped_lock DeprecatedScopedLock; +typedef std::recursive_mutex DeprecatedRecursiveMutex; +typedef std::lock_guard DeprecatedScopedLock; //------------------------------------------------------------------------------ diff --git a/src/ripple/module/basics/utility/CountedObject.cpp b/src/ripple/module/basics/utility/CountedObject.cpp index d2a120e95e..eb7fa1e2c1 100644 --- a/src/ripple/module/basics/utility/CountedObject.cpp +++ b/src/ripple/module/basics/utility/CountedObject.cpp @@ -17,6 +17,8 @@ */ //============================================================================== +#include + namespace ripple { CountedObjects& CountedObjects::getInstance () diff --git a/src/ripple/module/basics/utility/IniFile.cpp b/src/ripple/module/basics/utility/IniFile.cpp index 50f0cd903d..b4a49c166a 100644 --- a/src/ripple/module/basics/utility/IniFile.cpp +++ b/src/ripple/module/basics/utility/IniFile.cpp @@ -17,7 +17,9 @@ */ //============================================================================== +#include #include +#include namespace ripple { @@ -53,8 +55,6 @@ Section ParseSection (const std::string& strInput, const bool bTrim) if (strValue.empty () || strValue[0] == '#') { // Blank line or comment, do nothing. - - nothing (); } else if (strValue[0] == '[' && strValue[strValue.length () - 1] == ']') { diff --git a/src/ripple/module/basics/utility/StringUtilities.cpp b/src/ripple/module/basics/utility/StringUtilities.cpp index f8bce08889..7db6a094d1 100644 --- a/src/ripple/module/basics/utility/StringUtilities.cpp +++ b/src/ripple/module/basics/utility/StringUtilities.cpp @@ -17,10 +17,10 @@ */ //============================================================================== +#include #include - +#include #include - #include namespace ripple { diff --git a/src/ripple/module/basics/utility/StringUtilities.h b/src/ripple/module/basics/utility/StringUtilities.h index d63749d506..293fbc9e8a 100644 --- a/src/ripple/module/basics/utility/StringUtilities.h +++ b/src/ripple/module/basics/utility/StringUtilities.h @@ -20,12 +20,17 @@ #ifndef RIPPLE_STRINGUTILITIES_H #define RIPPLE_STRINGUTILITIES_H +#include +#include +#include + namespace ripple { // String utility functions. // Ripple specific constant used for parsing qualities and other things // +// VFALCO NOTE This does not belong here! // NIKB TODO Why is this here instead of somewhere more sensible? What // "other things" is this being used for? #define QUALITY_ONE 1000000000 // 10e9 diff --git a/src/ripple/module/basics/utility/Sustain.cpp b/src/ripple/module/basics/utility/Sustain.cpp index 3042c08c29..c10163256a 100644 --- a/src/ripple/module/basics/utility/Sustain.cpp +++ b/src/ripple/module/basics/utility/Sustain.cpp @@ -17,6 +17,20 @@ */ //============================================================================== +#include + +// For Sustain Linux variants +// VFALCO TODO Rewrite Sustain to use beast::Process +#ifdef __linux__ +#include +#include +#include +#endif +#ifdef __FreeBSD__ +#include +#include +#endif + namespace ripple { #ifdef __unix__ diff --git a/src/ripple/module/basics/utility/ThreadName.cpp b/src/ripple/module/basics/utility/ThreadName.cpp index a46e6ee30c..d1f62363b9 100644 --- a/src/ripple/module/basics/utility/ThreadName.cpp +++ b/src/ripple/module/basics/utility/ThreadName.cpp @@ -17,12 +17,14 @@ */ //============================================================================== +#if _MSC_VER + +#include + namespace ripple { // VFALCO TODO use beast::Thread::setCurrentThreadName() or something similar. -#if _MSC_VER - void setCallingThreadName (char const* threadName) { struct ThreadInfo @@ -50,7 +52,12 @@ void setCallingThreadName (char const* threadName) } } +} // ripple + #else + +namespace ripple { + #ifdef PR_SET_NAME #define HAVE_NAME_THREAD extern void setCallingThreadName (const char* n) @@ -89,9 +96,9 @@ extern void setCallingThreadName (const char* n) #ifndef HAVE_NAME_THREAD extern void setCallingThreadName (const char*) { - ; } #endif -#endif } // ripple + +#endif diff --git a/src/ripple/module/basics/utility/UptimeTimer.cpp b/src/ripple/module/basics/utility/UptimeTimer.cpp index 8adca4797a..2f6ac79504 100644 --- a/src/ripple/module/basics/utility/UptimeTimer.cpp +++ b/src/ripple/module/basics/utility/UptimeTimer.cpp @@ -17,6 +17,8 @@ */ //============================================================================== +#include + namespace ripple { UptimeTimer::UptimeTimer () diff --git a/src/ripple/module/core/functional/Job.cpp b/src/ripple/module/core/functional/Job.cpp index e9dc254e64..f29bd63313 100644 --- a/src/ripple/module/core/functional/Job.cpp +++ b/src/ripple/module/core/functional/Job.cpp @@ -44,7 +44,7 @@ Job::Job (JobType type, , mName (name) , m_queue_time (clock_type::now ()) { - m_loadEvent = std::make_shared (boost::ref (lm), name, false); + m_loadEvent = std::make_shared (std::ref (lm), name, false); } JobType Job::getType () const diff --git a/src/ripple/module/core/functional/Job.h b/src/ripple/module/core/functional/Job.h index 79a7133ae5..b81ef39a56 100644 --- a/src/ripple/module/core/functional/Job.h +++ b/src/ripple/module/core/functional/Job.h @@ -20,6 +20,10 @@ #ifndef RIPPLE_JOB_H #define RIPPLE_JOB_H +#include +#include +#include + namespace ripple { // Note that this queue should only be used for CPU-bound jobs diff --git a/src/ripple/module/core/functional/JobQueue.cpp b/src/ripple/module/core/functional/JobQueue.cpp index 32f424670d..91f10757ff 100644 --- a/src/ripple/module/core/functional/JobQueue.cpp +++ b/src/ripple/module/core/functional/JobQueue.cpp @@ -75,7 +75,7 @@ public: , m_invalidJobData (getJobTypes ().getInvalid (), collector) , m_processCount (0) , m_workers (*this, "JobQueue", 0) - , m_cancelCallback (boost::bind (&Stoppable::isStopping, this)) + , m_cancelCallback (std::bind (&Stoppable::isStopping, this)) , m_collector (collector) { hook = m_collector->make_hook (std::bind ( @@ -252,7 +252,7 @@ public: return std::shared_ptr (); return std::make_shared ( - boost::ref (iter-> second.load ()), name, true); + std::ref (iter-> second.load ()), name, true); } LoadEvent::autoptr getLoadEventAP (JobType t, const std::string& name) diff --git a/src/ripple/module/core/functional/JobQueue.h b/src/ripple/module/core/functional/JobQueue.h index 36c88f912a..4334b3ba0f 100644 --- a/src/ripple/module/core/functional/JobQueue.h +++ b/src/ripple/module/core/functional/JobQueue.h @@ -20,7 +20,9 @@ #ifndef RIPPLE_CORE_JOBQUEUE_H_INCLUDED #define RIPPLE_CORE_JOBQUEUE_H_INCLUDED +#include #include +#include namespace ripple { diff --git a/src/ripple/module/core/functional/JobTypes.h b/src/ripple/module/core/functional/JobTypes.h index aa54eb88dc..719c00c140 100644 --- a/src/ripple/module/core/functional/JobTypes.h +++ b/src/ripple/module/core/functional/JobTypes.h @@ -17,8 +17,12 @@ */ //============================================================================== +#ifndef RIPPLE_JOBTYPES_H_INCLUDED +#define RIPPLE_JOBTYPES_H_INCLUDED + #include #include +#include namespace ripple { @@ -224,3 +228,5 @@ private: }; } + +#endif diff --git a/src/ripple/module/core/functional/LoadMonitor.h b/src/ripple/module/core/functional/LoadMonitor.h index 8815a3a08d..bcf927ad18 100644 --- a/src/ripple/module/core/functional/LoadMonitor.h +++ b/src/ripple/module/core/functional/LoadMonitor.h @@ -20,6 +20,8 @@ #ifndef RIPPLE_LOADMONITOR_H_INCLUDED #define RIPPLE_LOADMONITOR_H_INCLUDED +#include + namespace ripple { // Monitors load levels and response times diff --git a/src/ripple/module/net/basics/RPCDoor.cpp b/src/ripple/module/net/basics/RPCDoor.cpp index 7946c5287a..8a976748e0 100644 --- a/src/ripple/module/net/basics/RPCDoor.cpp +++ b/src/ripple/module/net/basics/RPCDoor.cpp @@ -56,9 +56,9 @@ public: void startListening () { RPCServerImp::pointer new_connection (std::make_shared ( - boost::ref (mAcceptor.get_io_service ()), - boost::ref (m_sslContext->get ()), - boost::ref (m_rpcServerHandler))); + std::ref (mAcceptor.get_io_service ()), + std::ref (m_sslContext->get ()), + std::ref (m_rpcServerHandler))); mAcceptor.set_option (boost::asio::ip::tcp::acceptor::reuse_address (true)); diff --git a/src/ripple/module/net/basics/SNTPClient.cpp b/src/ripple/module/net/basics/SNTPClient.cpp index 61e1ce7fbd..ddad789f05 100644 --- a/src/ripple/module/net/basics/SNTPClient.cpp +++ b/src/ripple/module/net/basics/SNTPClient.cpp @@ -17,6 +17,7 @@ */ //============================================================================== +#include #include namespace ripple { @@ -91,13 +92,13 @@ public: mSocket.open (boost::asio::ip::udp::v4 ()); mSocket.async_receive_from (boost::asio::buffer (mReceiveBuffer, 256), - mReceiveEndpoint, boost::bind ( + mReceiveEndpoint, std::bind ( &SNTPClientImp::receivePacket, this, - boost::asio::placeholders::error, - boost::asio::placeholders::bytes_transferred)); + beast::asio::placeholders::error, + beast::asio::placeholders::bytes_transferred)); mTimer.expires_from_now (boost::posix_time::seconds (NTP_QUERY_FREQUENCY)); - mTimer.async_wait (boost::bind (&SNTPClientImp::timerEntry, this, boost::asio::placeholders::error)); + mTimer.async_wait (std::bind (&SNTPClientImp::timerEntry, this, beast::asio::placeholders::error)); } ~SNTPClientImp () @@ -193,8 +194,8 @@ public: boost::asio::ip::udp::resolver::query query (boost::asio::ip::udp::v4 (), best->first, "ntp"); mResolver.async_resolve (query, - boost::bind (&SNTPClientImp::resolveComplete, this, - boost::asio::placeholders::error, boost::asio::placeholders::iterator)); + std::bind (&SNTPClientImp::resolveComplete, this, + beast::asio::placeholders::error, beast::asio::placeholders::iterator)); #ifdef SNTP_DEBUG WriteLog (lsTRACE, SNTPClient) << "SNTP: Resolve pending for " << best->first; #endif @@ -231,8 +232,8 @@ public: reinterpret_cast (SNTPQueryData)[NTP_OFF_XMITTS_INT] = static_cast (time (nullptr)) + NTP_UNIX_OFFSET; reinterpret_cast (SNTPQueryData)[NTP_OFF_XMITTS_FRAC] = query.mQueryNonce; mSocket.async_send_to (boost::asio::buffer (SNTPQueryData, 48), *sel, - boost::bind (&SNTPClientImp::sendComplete, this, - boost::asio::placeholders::error, boost::asio::placeholders::bytes_transferred)); + std::bind (&SNTPClientImp::sendComplete, this, + beast::asio::placeholders::error, beast::asio::placeholders::bytes_transferred)); } } } @@ -268,8 +269,8 @@ public: } mSocket.async_receive_from (boost::asio::buffer (mReceiveBuffer, 256), mReceiveEndpoint, - boost::bind (&SNTPClientImp::receivePacket, this, boost::asio::placeholders::error, - boost::asio::placeholders::bytes_transferred)); + std::bind (&SNTPClientImp::receivePacket, this, beast::asio::placeholders::error, + beast::asio::placeholders::bytes_transferred)); } void sendComplete (const boost::system::error_code& error, std::size_t) @@ -336,7 +337,7 @@ public: { doQuery (); mTimer.expires_from_now (boost::posix_time::seconds (NTP_QUERY_FREQUENCY)); - mTimer.async_wait (boost::bind (&SNTPClientImp::timerEntry, this, boost::asio::placeholders::error)); + mTimer.async_wait (std::bind (&SNTPClientImp::timerEntry, this, beast::asio::placeholders::error)); } } diff --git a/src/ripple/module/net/rpc/RPCSub.cpp b/src/ripple/module/net/rpc/RPCSub.cpp index 1cd641d807..9cd3116ebb 100644 --- a/src/ripple/module/net/rpc/RPCSub.cpp +++ b/src/ripple/module/net/rpc/RPCSub.cpp @@ -205,8 +205,8 @@ RPCSub::pointer RPCSub::New (InfoSub::Source& source, const std::string& strUrl, const std::string& strUsername, const std::string& strPassword) { - return std::make_shared (boost::ref (source), - boost::ref (io_service), boost::ref (jobQueue), + return std::make_shared (std::ref (source), + std::ref (io_service), std::ref (jobQueue), strUrl, strUsername, strPassword); } diff --git a/src/ripple/module/overlay/api/Message.h b/src/ripple/module/overlay/api/Message.h index 44d55b2fc4..f5da398573 100644 --- a/src/ripple/module/overlay/api/Message.h +++ b/src/ripple/module/overlay/api/Message.h @@ -22,8 +22,6 @@ #include "ripple.pb.h" -#include - #include namespace ripple { diff --git a/src/ripple/module/overlay/impl/PeerDoor.cpp b/src/ripple/module/overlay/impl/PeerDoor.cpp index 815030daa5..fc6adceae7 100644 --- a/src/ripple/module/overlay/impl/PeerDoor.cpp +++ b/src/ripple/module/overlay/impl/PeerDoor.cpp @@ -19,6 +19,7 @@ #include #include +#include namespace ripple { @@ -77,8 +78,8 @@ public: void async_accept () { m_acceptor.async_accept (m_socket, - boost::bind (&PeerDoorImp::handleAccept, this, - boost::asio::placeholders::error)); + std::bind (&PeerDoorImp::handleAccept, this, + beast::asio::placeholders::error)); } //-------------------------------------------------------------------------- @@ -121,8 +122,8 @@ public: if (delay) { m_acceptDelay.expires_from_now (boost::posix_time::milliseconds (500)); - m_acceptDelay.async_wait (boost::bind (&PeerDoorImp::handleTimer, - this, boost::asio::placeholders::error)); + m_acceptDelay.async_wait (std::bind (&PeerDoorImp::handleTimer, + this, beast::asio::placeholders::error)); } else { diff --git a/src/ripple/module/overlay/impl/PeerImp.h b/src/ripple/module/overlay/impl/PeerImp.h index cf98772c25..b41874a908 100644 --- a/src/ripple/module/overlay/impl/PeerImp.h +++ b/src/ripple/module/overlay/impl/PeerImp.h @@ -192,7 +192,7 @@ public: std::list m_recentLedgers; std::list m_recentTxSets; - mutable boost::mutex m_recentLock; + mutable std::mutex m_recentLock; boost::asio::deadline_timer m_timer; @@ -586,7 +586,7 @@ public: bool hasLedger (uint256 const& hash, std::uint32_t seq) const { - boost::mutex::scoped_lock sl(m_recentLock); + std::lock_guard sl(m_recentLock); if ((seq != 0) && (seq >= m_minLedger) && (seq <= m_maxLedger)) return true; @@ -602,7 +602,7 @@ public: void ledgerRange (std::uint32_t& minSeq, std::uint32_t& maxSeq) const { - boost::mutex::scoped_lock sl(m_recentLock); + std::lock_guard sl(m_recentLock); minSeq = m_minLedger; maxSeq = m_maxLedger; @@ -610,7 +610,7 @@ public: bool hasTxSet (uint256 const& hash) const { - boost::mutex::scoped_lock sl(m_recentLock); + std::lock_guard sl(m_recentLock); BOOST_FOREACH (uint256 const & set, m_recentTxSets) if (set == hash) @@ -1508,7 +1508,7 @@ private: { #endif SerializerIterator sit (s); - SerializedTransaction::pointer stx = std::make_shared (boost::ref (sit)); + SerializedTransaction::pointer stx = std::make_shared (std::ref (sit)); uint256 txID = stx->getTransactionID(); int flags; @@ -1571,7 +1571,7 @@ private: { Serializer s (packet->validation ()); SerializerIterator sit (s); - SerializedValidation::pointer val = std::make_shared (boost::ref (sit), false); + SerializedValidation::pointer val = std::make_shared (std::ref (sit), false); if (closeTime > (120 + val->getFieldU32(sfSigningTime))) { @@ -2198,7 +2198,7 @@ private: void addLedger (uint256 const& hash) { - boost::mutex::scoped_lock sl(m_recentLock); + std::lock_guard sl(m_recentLock); BOOST_FOREACH (uint256 const & ledger, m_recentLedgers) if (ledger == hash) @@ -2550,7 +2550,7 @@ private: void addTxSet (uint256 const& hash) { - boost::mutex::scoped_lock sl(m_recentLock); + std::lock_guard sl(m_recentLock); if(std::find (m_recentTxSets.begin (), m_recentTxSets.end (), hash) != m_recentTxSets.end ()) return; diff --git a/src/ripple/module/rpc/handlers/AccountOffers.cpp b/src/ripple/module/rpc/handlers/AccountOffers.cpp index 2f5893a890..48045790a4 100644 --- a/src/ripple/module/rpc/handlers/AccountOffers.cpp +++ b/src/ripple/module/rpc/handlers/AccountOffers.cpp @@ -74,7 +74,7 @@ Json::Value RPCHandler::doAccountOffers (Json::Value params, Resource::Charge& l Json::Value& jvsOffers = (jvResult[jss::offers] = Json::arrayValue); lpLedger->visitAccountItems (raAccount.getAccountID (), - std::bind (&offerAdder, boost::ref (jvsOffers), + std::bind (&offerAdder, std::ref (jvsOffers), std::placeholders::_1)); loadType = Resource::feeMediumBurdenRPC; diff --git a/src/ripple/module/rpc/handlers/RipplePathFind.cpp b/src/ripple/module/rpc/handlers/RipplePathFind.cpp index f6e2bec158..2c50d970ba 100644 --- a/src/ripple/module/rpc/handlers/RipplePathFind.cpp +++ b/src/ripple/module/rpc/handlers/RipplePathFind.cpp @@ -94,7 +94,7 @@ Json::Value RPCHandler::doRipplePathFind ( if (lpLedger) { // The caller specified a ledger - lpLedger = std::make_shared (boost::ref (*lpLedger), false); + lpLedger = std::make_shared (std::ref (*lpLedger), false); cache = std::make_shared(lpLedger); } else diff --git a/src/ripple/module/rpc/handlers/Submit.cpp b/src/ripple/module/rpc/handlers/Submit.cpp index baa9a8d66b..1f2fc3bae2 100644 --- a/src/ripple/module/rpc/handlers/Submit.cpp +++ b/src/ripple/module/rpc/handlers/Submit.cpp @@ -50,7 +50,7 @@ Json::Value RPCHandler::doSubmit (Json::Value params, Resource::Charge& loadType try { - stpTrans = std::make_shared (boost::ref (sitTrans)); + stpTrans = std::make_shared (std::ref (sitTrans)); } catch (std::exception& e) { diff --git a/src/ripple/module/websocket/autosocket/AutoSocket.h b/src/ripple/module/websocket/autosocket/AutoSocket.h index 9661611371..f1830127c4 100644 --- a/src/ripple/module/websocket/autosocket/AutoSocket.h +++ b/src/ripple/module/websocket/autosocket/AutoSocket.h @@ -21,6 +21,7 @@ #define __AUTOSOCKET_H_ #include +#include // Socket wrapper that supports both SSL and non-SSL connections. // Generally, handle it as you would an SSL connection. @@ -44,14 +45,14 @@ public: : mSecure (false) , mBuffer (4) { - mSocket = std::make_shared (boost::ref (s), boost::ref (c)); + mSocket = std::make_shared (s, c); } AutoSocket (boost::asio::io_service& s, boost::asio::ssl::context& c, bool secureOnly, bool plainOnly) : mSecure (secureOnly) , mBuffer ((plainOnly || secureOnly) ? 0 : 4) { - mSocket = std::make_shared (boost::ref (s), boost::ref (c)); + mSocket = std::make_shared (s, c); } boost::asio::io_service& get_io_service () noexcept @@ -117,7 +118,7 @@ public: mSocket->set_verify_mode (boost::asio::ssl::verify_peer); // XXX Verify semantics of RFC 2818 are what we want. - mSocket->set_verify_callback (boost::bind (&rfc2818_verify, strDomain, boost::placeholders::_1, boost::placeholders::_2), ec); + mSocket->set_verify_callback (std::bind (&rfc2818_verify, strDomain, std::placeholders::_1, std::placeholders::_2), ec); return ec; } @@ -150,8 +151,8 @@ public: { // autodetect mSocket->next_layer ().async_receive (boost::asio::buffer (mBuffer), boost::asio::socket_base::message_peek, - boost::bind (&AutoSocket::handle_autodetect, this, cbFunc, - boost::asio::placeholders::error, boost::asio::placeholders::bytes_transferred)); + std::bind (&AutoSocket::handle_autodetect, this, cbFunc, + beast::asio::placeholders::error, beast::asio::placeholders::bytes_transferred)); } } diff --git a/src/ripple/peerfinder/impl/Checker.cpp b/src/ripple/peerfinder/impl/Checker.cpp index f407bff61c..ce13f86756 100644 --- a/src/ripple/peerfinder/impl/Checker.cpp +++ b/src/ripple/peerfinder/impl/Checker.cpp @@ -129,7 +129,7 @@ private: public: CheckerImp () : Thread ("PeerFinder::Checker") - , m_work (boost::in_place (boost::ref (m_io_service))) + , m_work (boost::in_place (std::ref (m_io_service))) { startThread (); } diff --git a/src/ripple/peerfinder/impl/Logic.h b/src/ripple/peerfinder/impl/Logic.h index 7e93d43060..8259a1cd6c 100644 --- a/src/ripple/peerfinder/impl/Logic.h +++ b/src/ripple/peerfinder/impl/Logic.h @@ -30,6 +30,7 @@ #include +#include #include #include @@ -576,9 +577,9 @@ public: // Test the slot's listening port before // adding it to the livecache for the first time. // - m_checker.async_test (ep.address, bind ( + m_checker.async_test (ep.address, std::bind ( &Logic::checkComplete, this, slot->remote_endpoint (), - ep.address, beast::_1)); + ep.address, std::placeholders::_1)); // Note that we simply discard the first Endpoint // that the neighbor sends when we perform the diff --git a/src/ripple/peerfinder/impl/Manager.cpp b/src/ripple/peerfinder/impl/Manager.cpp index 6cf57bbce0..6a999676a3 100644 --- a/src/ripple/peerfinder/impl/Manager.cpp +++ b/src/ripple/peerfinder/impl/Manager.cpp @@ -87,7 +87,7 @@ public: { m_queue.dispatch ( m_context.wrap ( - boost::bind (&Logic::addFixedPeer, &m_logic, + std::bind (&Logic::addFixedPeer, &m_logic, name, addresses))); } diff --git a/src/ripple/peerfinder/sim/Tests.cpp b/src/ripple/peerfinder/sim/Tests.cpp index ab2f90a03c..e03ce7bb39 100644 --- a/src/ripple/peerfinder/sim/Tests.cpp +++ b/src/ripple/peerfinder/sim/Tests.cpp @@ -188,7 +188,7 @@ public: , m_journal (Journal (m_sink, journal.severity()), Reporting::node) , m_next_port (m_config.listening_endpoint.port() + 1) , m_logic (boost::in_place ( - boost::ref (clock), boost::ref (*this), boost::ref (*this), boost::ref (*this), m_journal)) + std::ref (clock), std::ref (*this), std::ref (*this), std::ref (*this), m_journal)) , m_when_expire (m_network.now() + std::chrono::seconds (1)) { logic().setConfig (m_config.config); @@ -408,7 +408,7 @@ public: m_network.post (std::bind (&Logic::on_connected, &logic(), local_endpoint, remote_endpoint)); m_network.post (std::bind (&Node::doCheckAccept, - remote_node, boost::ref (*this), local_endpoint)); + remote_node, std::ref (*this), local_endpoint)); } } @@ -603,7 +603,7 @@ void Network::prepare () config, m_clock, m_journal); - m_table.emplace (address, boost::ref (m_nodes.back())); + m_table.emplace (address, std::ref (m_nodes.back())); address = next_endpoint (address); } @@ -624,7 +624,7 @@ void Network::prepare () config, m_clock, m_journal); - m_table.emplace (address, boost::ref (m_nodes.back())); + m_table.emplace (address, std::ref (m_nodes.back())); address = next_endpoint (address); } } diff --git a/src/ripple/sitefiles/impl/Manager.cpp b/src/ripple/sitefiles/impl/Manager.cpp index 620d8afd09..35d79833e1 100644 --- a/src/ripple/sitefiles/impl/Manager.cpp +++ b/src/ripple/sitefiles/impl/Manager.cpp @@ -61,19 +61,19 @@ public: void addListener (SiteFiles::Listener& listener) { - m_queue.post (beast::bind ( + m_queue.post (std::bind ( &Logic::addListener, &m_logic, std::ref (listener))); } void removeListener (SiteFiles::Listener& listener) { - m_queue.post (beast::bind ( + m_queue.post (std::bind ( &Logic::removeListener, &m_logic, std::ref (listener))); } void addURL (std::string const& urlstr) { - m_queue.post (beast::bind (&Logic::addURL, &m_logic, urlstr)); + m_queue.post (std::bind (&Logic::addURL, &m_logic, urlstr)); } //-------------------------------------------------------------------------- diff --git a/src/ripple/types/api/UInt160.h b/src/ripple/types/api/UInt160.h index 6ae46f47e5..93091ddf3a 100644 --- a/src/ripple/types/api/UInt160.h +++ b/src/ripple/types/api/UInt160.h @@ -27,6 +27,7 @@ #include #include +#include namespace ripple { diff --git a/src/ripple/unity/app.cpp b/src/ripple/unity/app.cpp index eee14830b6..482a4762bc 100644 --- a/src/ripple/unity/app.cpp +++ b/src/ripple/unity/app.cpp @@ -19,76 +19,30 @@ #include -#include -#include -#include -#include -#include -#include -#include - #include - #include #include #include -#include - -// This .cpp will end up including all of the public header -// material in Ripple since it holds the Application object. - -#include #include #include #include #include -#include -#include - -#include // For Application.cpp - -#include #include - -#include - -#include #include - -#include #include - -#include #include - -#include -#include -#include #include #include #include - -#include - #include #include -#include #include - -#include #include #include -#include #include - -#include - -#include #include - #include - #include //------------------------------------------------------------------------------ diff --git a/src/ripple/unity/app.h b/src/ripple/unity/app.h index 63f1dda209..22a0b6e197 100644 --- a/src/ripple/unity/app.h +++ b/src/ripple/unity/app.h @@ -28,7 +28,6 @@ // purely abstract and move implementation into .cpp files. // -#include #include #include #include diff --git a/src/ripple/unity/app1.cpp b/src/ripple/unity/app1.cpp index 5d8ac816aa..164deff175 100644 --- a/src/ripple/unity/app1.cpp +++ b/src/ripple/unity/app1.cpp @@ -19,7 +19,6 @@ #include -#include #include #include #include diff --git a/src/ripple/unity/basics.cpp b/src/ripple/unity/basics.cpp index df8bde8bc5..11c20f8506 100644 --- a/src/ripple/unity/basics.cpp +++ b/src/ripple/unity/basics.cpp @@ -19,38 +19,12 @@ #include -#include - -#include -#include // For StringUtilities.cpp - -#include // for Log files - -//------------------------------------------------------------------------------ - -// For Sustain Linux variants -// -// VFALCO TODO Rewrite Sustain to use beast::Process -#ifdef __linux__ -#include -#include -#include -#endif -#ifdef __FreeBSD__ -#include -#include -#endif - -//------------------------------------------------------------------------------ - #include -#include - #include #include #include #include - +#include #include #include #include diff --git a/src/ripple/unity/basics.h b/src/ripple/unity/basics.h index b3079d0cf9..e31967815f 100644 --- a/src/ripple/unity/basics.h +++ b/src/ripple/unity/basics.h @@ -22,7 +22,6 @@ #include -#include #include #include @@ -33,13 +32,6 @@ using beast::zero; using beast::Zero; -// VFALCO TODO Lets ditch this macro -#ifndef RIPPLE_TRACK_MUTEXES -# define RIPPLE_TRACK_MUTEXES 0 -#endif - -//------------------------------------------------------------------------------ - #include #include diff --git a/src/ripple/unity/core.cpp b/src/ripple/unity/core.cpp index 87f5cb9851..c505cea85b 100644 --- a/src/ripple/unity/core.cpp +++ b/src/ripple/unity/core.cpp @@ -25,7 +25,6 @@ #include #include -#include #include #include diff --git a/src/ripple/unity/data.cpp b/src/ripple/unity/data.cpp index a3c7bbfce8..a46fab4e8f 100644 --- a/src/ripple/unity/data.cpp +++ b/src/ripple/unity/data.cpp @@ -23,7 +23,6 @@ //#include -#include #include #include #include diff --git a/src/ripple/unity/http.cpp b/src/ripple/unity/http.cpp index 924e8e199d..d980419cbe 100644 --- a/src/ripple/unity/http.cpp +++ b/src/ripple/unity/http.cpp @@ -23,7 +23,6 @@ #include -#include #include #include diff --git a/src/ripple/unity/net.cpp b/src/ripple/unity/net.cpp index 74f86b8c0d..8176cd9348 100644 --- a/src/ripple/unity/net.cpp +++ b/src/ripple/unity/net.cpp @@ -28,13 +28,11 @@ #include -#include #include #include #include #include #include -#include #include #include #include diff --git a/src/ripple/unity/net.h b/src/ripple/unity/net.h index df827f9807..777174a439 100644 --- a/src/ripple/unity/net.h +++ b/src/ripple/unity/net.h @@ -20,7 +20,6 @@ #ifndef RIPPLE_NET_H_INCLUDED #define RIPPLE_NET_H_INCLUDED -#include #include // For InfoSub #include diff --git a/src/ripple/unity/peerfinder.cpp b/src/ripple/unity/peerfinder.cpp index 13c1c56207..d3c5c023d5 100644 --- a/src/ripple/unity/peerfinder.cpp +++ b/src/ripple/unity/peerfinder.cpp @@ -31,7 +31,6 @@ #include #include -#include #include #include #include diff --git a/src/ripple/unity/resource.cpp b/src/ripple/unity/resource.cpp index c69cfaea46..014ea611fb 100644 --- a/src/ripple/unity/resource.cpp +++ b/src/ripple/unity/resource.cpp @@ -21,7 +21,6 @@ #include -#include #include #include diff --git a/src/ripple/unity/sitefiles.cpp b/src/ripple/unity/sitefiles.cpp index 02454a102d..7dea1ca1f1 100644 --- a/src/ripple/unity/sitefiles.cpp +++ b/src/ripple/unity/sitefiles.cpp @@ -23,7 +23,6 @@ #include // HTTPClientBase -#include #include #include diff --git a/src/ripple/unity/sitefiles.h b/src/ripple/unity/sitefiles.h index 39d07ada34..e842a8eeab 100644 --- a/src/ripple/unity/sitefiles.h +++ b/src/ripple/unity/sitefiles.h @@ -22,8 +22,6 @@ #include -#include - #include #include diff --git a/src/ripple/unity/testoverlay.h b/src/ripple/unity/testoverlay.h index c4dcf34516..da69608b5c 100644 --- a/src/ripple/unity/testoverlay.h +++ b/src/ripple/unity/testoverlay.h @@ -20,7 +20,6 @@ #ifndef RIPPLE_TESTOVERLAY_H_INCLUDED #define RIPPLE_TESTOVERLAY_H_INCLUDED -#include #include #include diff --git a/src/ripple/unity/types.h b/src/ripple/unity/types.h index 4479d51a22..7a2e148ee4 100644 --- a/src/ripple/unity/types.h +++ b/src/ripple/unity/types.h @@ -24,7 +24,6 @@ #include -#include #include #include #include diff --git a/src/ripple/unity/validators.cpp b/src/ripple/unity/validators.cpp index aa0da90328..c7ad1e612c 100644 --- a/src/ripple/unity/validators.cpp +++ b/src/ripple/unity/validators.cpp @@ -21,7 +21,6 @@ #include -#include #include #include #include diff --git a/src/ripple/unity/websocket.h b/src/ripple/unity/websocket.h index 0d47b19814..7424facd07 100644 --- a/src/ripple/unity/websocket.h +++ b/src/ripple/unity/websocket.h @@ -28,7 +28,6 @@ #include #include -#include #include #include diff --git a/src/ripple/validators/impl/Tuning.h b/src/ripple/validators/impl/Tuning.h index 642869f432..00ad00fcf6 100644 --- a/src/ripple/validators/impl/Tuning.h +++ b/src/ripple/validators/impl/Tuning.h @@ -124,13 +124,13 @@ public: iterator iter (m_back.find (value.first)); if (iter != m_back.end()) return std::make_pair ( - boost::ref (iter->second), - boost::ref (m_back_info)); + std::ref (iter->second), + std::ref (m_back_info)); std::pair result ( m_front.insert (value)); return std::make_pair ( - boost::ref (result.first->second), - boost::ref (m_front_info)); + std::ref (result.first->second), + std::ref (m_front_info)); } void cycle () diff --git a/src/websocket/src/sockets/multitls.hpp b/src/websocket/src/sockets/multitls.hpp index ec1ef3afc6..f943932218 100644 --- a/src/websocket/src/sockets/multitls.hpp +++ b/src/websocket/src/sockets/multitls.hpp @@ -28,8 +28,10 @@ #ifndef WEBSOCKETPP_SOCKET_MULTITLS_HPP #define WEBSOCKETPP_SOCKET_MULTITLS_HPP +// VFALCO NOTE This is a prohibited dependency direction! #include - +#include + namespace websocketpp { namespace socket {