Remove unused classes

This commit is contained in:
Vinnie Falco
2014-02-27 20:12:52 -08:00
parent 78e1995365
commit 8eddcfd3d5
9 changed files with 5 additions and 183 deletions

View File

@@ -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

View File

@@ -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"

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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

View File

@@ -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

View File

@@ -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