mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-19 18:45:52 +00:00
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:
committed by
Vinnie Falco
parent
9ad5644a8c
commit
845c9f8a51
@@ -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:
|
||||
|
||||
@@ -180,7 +180,7 @@ template <class ElementType>
|
||||
class DefaultElementComparator
|
||||
{
|
||||
private:
|
||||
typedef ElementType ParameterType;
|
||||
using ParameterType = ElementType;
|
||||
|
||||
public:
|
||||
static int compareElements (ParameterType first, ParameterType second)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 ()); }
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -86,8 +86,8 @@ private:
|
||||
}
|
||||
};
|
||||
|
||||
typedef CriticalSection MutexType;
|
||||
typedef MutexType::ScopedLockType ScopedLockType;
|
||||
using MutexType = CriticalSection;
|
||||
using ScopedLockType = MutexType::ScopedLockType;
|
||||
|
||||
static StaticDestructor s_staticDestructor;
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user