Change typedef to using.

Conflicts:
	src/ripple/app/TODO.md
	src/ripple/app/ledger/Ledger.h
	src/ripple/protocol/Protocol.h
This commit is contained in:
Howard Hinnant
2015-05-21 19:12:10 -04:00
committed by Vinnie Falco
parent 9ad5644a8c
commit 845c9f8a51
90 changed files with 362 additions and 362 deletions

View File

@@ -57,7 +57,7 @@ template <typename ElementType,
class Array
{
private:
typedef ElementType ParameterType;
using ParameterType = ElementType;
public:
//==============================================================================
@@ -1021,7 +1021,7 @@ public:
inline const TypeOfCriticalSectionToUse& getLock() const noexcept { return data; }
/** Returns the type of scoped lock to use for locking this array */
typedef typename TypeOfCriticalSectionToUse::ScopedLockType ScopedLockType;
using ScopedLockType = typename TypeOfCriticalSectionToUse::ScopedLockType;
private:

View File

@@ -180,7 +180,7 @@ template <class ElementType>
class DefaultElementComparator
{
private:
typedef ElementType ParameterType;
using ParameterType = ElementType;
public:
static int compareElements (ParameterType first, ParameterType second)

View File

@@ -322,7 +322,7 @@ int compare (SemanticVersion const& lhs, SemanticVersion const& rhs)
class SemanticVersion_test: public unit_test::suite
{
typedef SemanticVersion::identifier_list identifier_list;
using identifier_list = SemanticVersion::identifier_list;
public:
void checkPass (std::string const& input, bool shouldPass = true)

View File

@@ -37,7 +37,7 @@ namespace beast {
class SemanticVersion
{
public:
typedef std::vector<std::string> identifier_list;
using identifier_list = std::vector<std::string>;
int majorVersion;
int minorVersion;

View File

@@ -74,8 +74,8 @@ public:
#endif
// Standard container interface
typedef char* iterator;
typedef char const* const_iterator;
using iterator = char*;
using const_iterator = char const*;
inline iterator begin () noexcept { return static_cast <iterator> (getData ()); }
inline iterator end () noexcept { return addBytesToPointer (begin (), size); }
inline const_iterator cbegin () const noexcept { return static_cast <const_iterator> (getConstData ()); }

View File

@@ -104,10 +104,10 @@ namespace
{
#if BEAST_LINUX || \
(BEAST_IOS && ! __DARWIN_ONLY_64_BIT_INO_T) // (this iOS stuff is to avoid a simulator bug)
typedef struct stat64 beast_statStruct;
using beast_statStruct = struct stat64;
#define BEAST_STAT stat64
#else
typedef struct stat beast_statStruct;
using beast_statStruct = struct stat;
#define BEAST_STAT stat
#endif

View File

@@ -52,7 +52,7 @@ namespace SystemStats
getStackBacktrace();
/** A void() function type, used by setApplicationCrashHandler(). */
typedef void (*CrashHandlerFunction)();
using CrashHandlerFunction = void (*)();
/** Sets up a global callback function that will be called if the application
executes some kind of illegal instruction.

View File

@@ -26,8 +26,8 @@ class DeadlineTimer::Manager
: protected Thread
{
private:
typedef CriticalSection LockType;
typedef List <DeadlineTimer> Items;
using LockType = CriticalSection;
using Items = List <DeadlineTimer>;
public:
Manager () : Thread ("DeadlineTimer::Manager")

View File

@@ -92,13 +92,13 @@ public:
//==============================================================================
/** Provides the type of scoped lock to use with a CriticalSection. */
typedef GenericScopedLock <CriticalSection> ScopedLockType;
using ScopedLockType = GenericScopedLock <CriticalSection>;
/** Provides the type of scoped unlocker to use with a CriticalSection. */
typedef GenericScopedUnlock <CriticalSection> ScopedUnlockType;
using ScopedUnlockType = GenericScopedUnlock <CriticalSection>;
/** Provides the type of scoped try-locker to use with a CriticalSection. */
typedef GenericScopedTryLock <CriticalSection> ScopedTryLockType;
using ScopedTryLockType = GenericScopedTryLock <CriticalSection>;
//--------------------------------------------------------------------------
//
@@ -161,7 +161,7 @@ public:
};
/** A dummy scoped-unlocker type to use with a dummy critical section. */
typedef ScopedLockType ScopedUnlockType;
using ScopedUnlockType = ScopedLockType;
};
//==============================================================================
@@ -187,7 +187,7 @@ public:
@see CriticalSection, ScopedUnlock
*/
typedef CriticalSection::ScopedLockType ScopedLock;
using ScopedLock = CriticalSection::ScopedLockType;
//==============================================================================
/**
@@ -227,7 +227,7 @@ typedef CriticalSection::ScopedLockType ScopedLock;
@see CriticalSection, ScopedLock
*/
typedef CriticalSection::ScopedUnlockType ScopedUnlock;
using ScopedUnlock = CriticalSection::ScopedUnlockType;
//==============================================================================
/**
@@ -260,7 +260,7 @@ typedef CriticalSection::ScopedUnlockType ScopedUnlock;
@see CriticalSection::tryEnter, ScopedLock, ScopedUnlock, ScopedReadLock
*/
typedef CriticalSection::ScopedTryLockType ScopedTryLock;
using ScopedTryLock = CriticalSection::ScopedTryLockType;
} // beast

View File

@@ -86,8 +86,8 @@ private:
}
};
typedef CriticalSection MutexType;
typedef MutexType::ScopedLockType ScopedLockType;
using MutexType = CriticalSection;
using ScopedLockType = MutexType::ScopedLockType;
static StaticDestructor s_staticDestructor;

View File

@@ -92,11 +92,11 @@ namespace TimeHelpers
static inline String formatString (const String& format, const struct tm* const tm)
{
#if BEAST_ANDROID
typedef CharPointer_UTF8 StringType;
using StringType = CharPointer_UTF8;
#elif BEAST_WINDOWS
typedef CharPointer_UTF16 StringType;
using StringType = CharPointer_UTF16;
#else
typedef CharPointer_UTF32 StringType;
using StringType = CharPointer_UTF32;
#endif
for (size_t bufferSize = 256; ; bufferSize += 256)