mirror of
https://github.com/Xahau/xahaud.git
synced 2025-11-20 02:25:53 +00:00
Remove unused classes
This commit is contained in:
@@ -2229,7 +2229,6 @@
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\src\ripple\algorithm\api\CycledSet.h" />
|
||||
<ClInclude Include="..\..\src\ripple\algorithm\api\DecayingSample.h" />
|
||||
<ClInclude Include="..\..\src\ripple\algorithm\api\DiscreteClock.h" />
|
||||
<ClInclude Include="..\..\src\ripple\common\counted_bind.h" />
|
||||
<ClInclude Include="..\..\src\ripple\common\KeyCache.h" />
|
||||
<ClInclude Include="..\..\src\ripple\common\Resolver.h" />
|
||||
|
||||
@@ -2538,9 +2538,6 @@
|
||||
<ClInclude Include="..\..\src\ripple\algorithm\api\CycledSet.h">
|
||||
<Filter>[1] Ripple\algorithm\api</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\algorithm\api\DiscreteClock.h">
|
||||
<Filter>[1] Ripple\algorithm\api</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\sitefiles\ripple_sitefiles.h">
|
||||
<Filter>[1] Ripple\sitefiles</Filter>
|
||||
</ClInclude>
|
||||
|
||||
@@ -223,13 +223,10 @@
|
||||
<ClInclude Include="..\..\beast\type_traits\IsIntegral.h" />
|
||||
<ClInclude Include="..\..\beast\type_traits\IsSigned.h" />
|
||||
<ClInclude Include="..\..\beast\type_traits\maybe_const.h" />
|
||||
<ClInclude Include="..\..\beast\type_traits\RemoveSigned.h" />
|
||||
<ClInclude Include="..\..\beast\Uncopyable.h" />
|
||||
<ClInclude Include="..\..\beast\Utility.h" />
|
||||
<ClInclude Include="..\..\beast\utility\BaseFromMember.h" />
|
||||
<ClInclude Include="..\..\beast\utility\Debug.h" />
|
||||
<ClInclude Include="..\..\beast\utility\empty_base_optimization.h" />
|
||||
<ClInclude Include="..\..\beast\utility\EnableIf.h" />
|
||||
<ClInclude Include="..\..\beast\utility\Error.h" />
|
||||
<ClInclude Include="..\..\beast\utility\hash_pair.h" />
|
||||
<ClInclude Include="..\..\beast\utility\Journal.h" />
|
||||
|
||||
@@ -866,12 +866,6 @@
|
||||
<ClInclude Include="..\..\beast\type_traits\IsIntegral.h">
|
||||
<Filter>beast\type_traits</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\beast\type_traits\RemoveSigned.h">
|
||||
<Filter>beast\type_traits</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\beast\utility\EnableIf.h">
|
||||
<Filter>beast\utility</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\beast\utility\Journal.h">
|
||||
<Filter>beast\utility</Filter>
|
||||
</ClInclude>
|
||||
@@ -1140,9 +1134,6 @@
|
||||
<ClInclude Include="..\..\beast\threads\ScopedWrapperContext.h">
|
||||
<Filter>beast\threads</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\beast\utility\BaseFromMember.h">
|
||||
<Filter>beast\utility</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\beast\Asio.h">
|
||||
<Filter>beast</Filter>
|
||||
</ClInclude>
|
||||
|
||||
@@ -23,6 +23,5 @@
|
||||
#include "type_traits/IntegralConstant.h"
|
||||
#include "type_traits/IsIntegral.h"
|
||||
#include "type_traits/IsSigned.h"
|
||||
#include "type_traits/RemoveSigned.h"
|
||||
|
||||
#endif
|
||||
|
||||
@@ -20,9 +20,7 @@
|
||||
#ifndef BEAST_UTILITY_H_INCLUDED
|
||||
#define BEAST_UTILITY_H_INCLUDED
|
||||
|
||||
#include "utility/BaseFromMember.h"
|
||||
#include "utility/Debug.h"
|
||||
#include "utility/EnableIf.h"
|
||||
#include "utility/Error.h"
|
||||
#include "utility/Journal.h"
|
||||
#include "utility/LeakChecked.h"
|
||||
|
||||
@@ -22,7 +22,8 @@
|
||||
|
||||
#include "../Config.h"
|
||||
#include "../CStdInt.h"
|
||||
#include "../FixedArray.h"
|
||||
|
||||
#include <array>
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@@ -36,7 +37,7 @@ enum
|
||||
};
|
||||
|
||||
/** A container suitable for holding the resulting hash. */
|
||||
typedef FixedArray <uint8, digestLength> digest_type;
|
||||
typedef std::array <uint8, digestLength> digest_type;
|
||||
|
||||
namespace detail {
|
||||
struct Context
|
||||
@@ -85,7 +86,7 @@ public:
|
||||
|
||||
digest_type& finish (digest_type& digest)
|
||||
{
|
||||
finish (digest.c_array());
|
||||
finish (digest.data());
|
||||
return digest;
|
||||
}
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ void* hash (void const* buffer, std::size_t bytes, void* digest)
|
||||
|
||||
digest_type& hash (void const* buffer, std::size_t bytes, digest_type& digest)
|
||||
{
|
||||
hash (buffer, bytes, digest.c_array());
|
||||
hash (buffer, bytes, digest.data());
|
||||
return digest;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
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_TYPE_TRAITS_REMOVESIGNED_H_INCLUDED
|
||||
#define BEAST_TYPE_TRAITS_REMOVESIGNED_H_INCLUDED
|
||||
|
||||
#include "IntegralConstant.h"
|
||||
#include "../CStdInt.h"
|
||||
|
||||
namespace beast {
|
||||
|
||||
/** Returns an equally sized, unsigned type.
|
||||
Requires:
|
||||
IsIntegral<T>::value == true
|
||||
*/
|
||||
template <typename T>
|
||||
struct RemoveSigned
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
template <> struct RemoveSigned <int8> { typedef uint8 type; };
|
||||
template <> struct RemoveSigned <int16> { typedef uint16 type; };
|
||||
template <> struct RemoveSigned <int32> { typedef uint32 type; };
|
||||
template <> struct RemoveSigned <int64> { typedef uint64 type; };
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,71 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of rippled: https://github.com/ripple/rippled
|
||||
Copyright (c) 2012, 2013 Ripple Labs Inc.
|
||||
|
||||
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_UTILITY_BASEFROMMEMBER_H_INCLUDED
|
||||
#define BEAST_UTILITY_BASEFROMMEMBER_H_INCLUDED
|
||||
|
||||
namespace beast {
|
||||
|
||||
template <typename T, int UniqueID = 0>
|
||||
class BaseFromMember
|
||||
{
|
||||
private:
|
||||
T m_t;
|
||||
|
||||
public:
|
||||
BaseFromMember ()
|
||||
: m_t (T())
|
||||
{
|
||||
}
|
||||
|
||||
template <class P1>
|
||||
explicit BaseFromMember (P1 const& p1)
|
||||
: m_t (p1)
|
||||
{ }
|
||||
|
||||
template <class P1, class P2>
|
||||
BaseFromMember (P1 const& p1, P2 const& p2)
|
||||
: m_t (p1, p2)
|
||||
{ }
|
||||
|
||||
template <class P1, class P2, class P3>
|
||||
BaseFromMember (P1 const& p1, P2 const& p2, P3 const& p3)
|
||||
: m_t (p1, p2, p3)
|
||||
{ }
|
||||
|
||||
template <class P1, class P2, class P3, class P4>
|
||||
BaseFromMember (P1 const& p1, P2 const& p2, P3 const& p3, P4 const& p4)
|
||||
: m_t (p1, p2, p3, p4)
|
||||
{ }
|
||||
|
||||
template <class P1, class P2, class P3, class P4, class P5>
|
||||
BaseFromMember (P1 const& p1, P2 const& p2, P3 const& p3, P4 const& p4, P5 const& p5)
|
||||
: m_t (p1, p2, p3, p4, p5)
|
||||
{ }
|
||||
|
||||
T& member()
|
||||
{ return m_t; }
|
||||
|
||||
T const& member() const
|
||||
{ return m_t; }
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,48 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
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_UTILITY_ENABLEIF_H_INCLUDED
|
||||
#define BEAST_UTILITY_ENABLEIF_H_INCLUDED
|
||||
|
||||
#include "../type_traits/IntegralConstant.h"
|
||||
|
||||
namespace beast
|
||||
{
|
||||
|
||||
template <bool Enable, class T = void>
|
||||
struct EnableIfBool : TrueType { typedef T type; };
|
||||
|
||||
template <class T>
|
||||
struct EnableIfBool <false, T> : FalseType { };
|
||||
|
||||
template <class Cond, class T = void>
|
||||
struct EnableIf : public EnableIfBool <Cond::value, T> { };
|
||||
|
||||
template <bool Enable, class T = void>
|
||||
struct DisableIfBool : FalseType { typedef T type; };
|
||||
|
||||
template <class T>
|
||||
struct DisableIfBool <true, T> { };
|
||||
|
||||
template <class Cond, class T = void>
|
||||
struct DisableIf : public DisableIfBool <Cond::value, T> { };
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,5 +1 @@
|
||||
# Algorithm TODO
|
||||
|
||||
- Rethink the CycledSet (and cousin AgedCache). Make each element part
|
||||
of an intrusive linked list, add a DiscreteClock data member, and
|
||||
perform aging on each insertion or sweep rather than once in a while.
|
||||
|
||||
@@ -1,111 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of rippled: https://github.com/ripple/rippled
|
||||
Copyright (c) 2012, 2013 Ripple Labs Inc.
|
||||
|
||||
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 RIPPLE_ALGORITHM_DISCRETECLOCK_H_INCLUDED
|
||||
#define RIPPLE_ALGORITHM_DISCRETECLOCK_H_INCLUDED
|
||||
|
||||
#include "beast/beast/StaticAssert.h"
|
||||
#include "beast/beast/type_traits/IsIntegral.h"
|
||||
#include "beast/beast/chrono/RelativeTime.h"
|
||||
|
||||
namespace ripple {
|
||||
|
||||
/** Interface for an elapsed time clock that uses integral units. */
|
||||
template <typename ElapsedType>
|
||||
class DiscreteClock
|
||||
{
|
||||
public:
|
||||
/** Source of time for the discrete clock. */
|
||||
class Source
|
||||
{
|
||||
public:
|
||||
typedef ElapsedType elapsed_type;
|
||||
typedef DiscreteClock <elapsed_type> DiscreteClockType;
|
||||
virtual ElapsedType operator() () = 0;
|
||||
};
|
||||
|
||||
/** Integral elapsed time type relative to an unspecified past event. */
|
||||
typedef ElapsedType elapsed_type;
|
||||
|
||||
DiscreteClock (Source& source)
|
||||
: m_source (source)
|
||||
{
|
||||
static_bassert (IsIntegral <elapsed_type>::value);
|
||||
}
|
||||
|
||||
/** Returns the elapsed time in discrete units.
|
||||
The elapsed time is relative to an unspecified event.
|
||||
*/
|
||||
elapsed_type operator() () const
|
||||
{
|
||||
return m_source();
|
||||
}
|
||||
|
||||
private:
|
||||
Source& m_source;
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** Seconds-based clock that uses elapsed time from startup as a time source. */
|
||||
class SimpleMonotonicClock : public DiscreteClock <int>::Source
|
||||
{
|
||||
public:
|
||||
elapsed_type operator() ()
|
||||
{
|
||||
return static_cast <elapsed_type> (
|
||||
RelativeTime::fromStartup().inSeconds());
|
||||
}
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** A manually-operated clock.
|
||||
This can be useful for unit tests.
|
||||
*/
|
||||
class ManualClock : public DiscreteClock <int>::Source
|
||||
{
|
||||
private:
|
||||
elapsed_type m_now;
|
||||
|
||||
public:
|
||||
ManualClock ()
|
||||
: m_now (elapsed_type())
|
||||
{
|
||||
}
|
||||
|
||||
elapsed_type& now()
|
||||
{
|
||||
return m_now;
|
||||
}
|
||||
|
||||
elapsed_type now() const
|
||||
{
|
||||
return m_now;
|
||||
}
|
||||
|
||||
elapsed_type operator() ()
|
||||
{
|
||||
return now();
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -4,4 +4,3 @@
|
||||
|
||||
- Clean up and optimize Base58 conversions
|
||||
|
||||
- Generalize AgedHistory to use a DiscreteClock and not have two maps
|
||||
|
||||
Reference in New Issue
Block a user