mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
General refactoring, using C++11
* Remove broken RecycledObjectPool * Fix beast::ServiceQueue using List instead of LockFreeStack * Add class semaphore, fixes broken Semaphore * Move crytpo module files to new beast directory * Use c++11 replacements for boost and beast types: - std::atomic instead of beast::Atomic - std::function instead of boost::function, beast::function - std::unique_ptr instead of beast::ScopedPointer - std::shared_ptr instead of boost::shared_ptr * Remove modules: - beast_db - beast_crypto - beast_extras * Remove unnecessary classes: - AbstractFifo - AddConst - AtomicCounter - AtomicFlag - AtomicPointer - AtomicState - CopyConst - Expression - ForwardList - IfCond - Interval - IntrusiveArray - KeyvaDB - PointerToOther - PointerTraits - RemoveConst - RemoveConstVolatile - RemoveReference - RemoveVolatile - SharedObjectArray - SingleThreadedSharedObject - SophiaDB factory - SortedSet - WeakReference - beast::unique_ptr
This commit is contained in:
@@ -20,6 +20,8 @@
|
||||
#ifndef RIPPLE_VALIDATORS_LOGIC_H_INCLUDED
|
||||
#define RIPPLE_VALIDATORS_LOGIC_H_INCLUDED
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace ripple {
|
||||
namespace Validators {
|
||||
|
||||
@@ -158,7 +160,7 @@ public:
|
||||
{
|
||||
if (findSourceByID (source->uniqueID()))
|
||||
{
|
||||
ScopedPointer <Source> object (source);
|
||||
std::unique_ptr <Source> object (source);
|
||||
m_journal.error << "Duplicate " << source->name();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -89,10 +89,7 @@ private:
|
||||
|
||||
SourceFile* SourceFile::New (File const& file)
|
||||
{
|
||||
ScopedPointer <SourceFile> object (
|
||||
new SourceFileImp (file));
|
||||
|
||||
return object.release ();
|
||||
return new SourceFileImp (file);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -75,10 +75,7 @@ private:
|
||||
SourceStrings* SourceStrings::New (
|
||||
String name, StringArray const& strings)
|
||||
{
|
||||
ScopedPointer <SourceStrings> object (
|
||||
new SourceStringsImp (name, strings));
|
||||
|
||||
return object.release ();
|
||||
return new SourceStringsImp (name, strings);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace ripple {
|
||||
namespace Validators {
|
||||
|
||||
@@ -75,7 +77,7 @@ public:
|
||||
|
||||
private:
|
||||
URL m_url;
|
||||
ScopedPointer <HTTPClientBase> m_client;
|
||||
std::unique_ptr <HTTPClientBase> m_client;
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user