Skip to content

Commit f48deb2

Browse files
committed
repo: do some "minor" cleanups
1 parent 0cc9756 commit f48deb2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+1189
-1174
lines changed

source/bootil/include/Bootil/Base.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
namespace Bootil
44
{
5-
typedef std::string BString;
6-
typedef std::wstring WString;
5+
using BString = std::string;
6+
using WString = std::wstring;
77
}
88

99
#define BOOTIL_FOREACH( varname, arrayname, arraytype ) for ( arraytype::iterator varname = arrayname.begin(); varname != arrayname.end(); ++varname )

source/bootil/include/Bootil/Data/Tree.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ namespace Bootil
1313
{
1414
public:
1515

16-
typedef TreeT<TString> ThisClass;
17-
typedef typename std::list< ThisClass > List;
16+
using ThisClass = TreeT<TString>;
17+
using List = typename std::list< ThisClass >;
1818

1919
public:
2020

@@ -111,8 +111,8 @@ namespace Bootil
111111
// Although the wide version is probably a waste of time since
112112
// nothing supports it right now.
113113
//
114-
typedef TreeT<Bootil::BString> Tree;
115-
typedef TreeT<Bootil::WString> TreeW;
114+
using Tree = TreeT<Bootil::BString>;
115+
using TreeW = TreeT<Bootil::WString>;
116116

117117

118118
//

source/bootil/include/Bootil/Debug/Debug.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace Bootil
88
{
99
public:
1010

11-
typedef std::list< IListener* > List;
11+
using List = std::list< IListener* >;
1212
static BOOTIL_EXPORT void Add( IListener* listener );
1313
static BOOTIL_EXPORT void Remove( IListener* listener );
1414

@@ -35,7 +35,7 @@ namespace Bootil
3535

3636
namespace Crash
3737
{
38-
typedef void (*MiniDumpFunction)( unsigned int nExceptionCode, void *pException );
38+
using MiniDumpFunction = void (*)( unsigned int nExceptionCode, void *pException );
3939

4040
BOOTIL_EXPORT void SetMinidumpFunction( MiniDumpFunction func );
4141
BOOTIL_EXPORT void SetupCallback();

source/bootil/include/Bootil/File/System.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace Bootil
88
{
99
public:
1010

11-
typedef std::list<BString> Paths;
11+
using Paths = std::list<BString>;
1212

1313
System();
1414
System( BString strInitalPath );

source/bootil/include/Bootil/Network/Router.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace Bootil
88
// I'm undecided on what MessageID should be.
99
// We could probably get away with an unsigned char.
1010
//
11-
typedef unsigned short MessageID;
11+
using MessageID = unsigned short;
1212

1313
//
1414
// This is the standard message that is passed from the Router
@@ -37,7 +37,7 @@ namespace Bootil
3737
{
3838
public:
3939

40-
typedef void ( MsgHandler::*FunctionWithData )( Message& data );
40+
using FunctionWithData = void ( MsgHandler::* )( Message& data );
4141
};
4242

4343

@@ -68,8 +68,8 @@ namespace Bootil
6868

6969
};
7070

71-
typedef std::map<TMessageType, FunctionCallback> ProcessorMap;
72-
typedef std::map<MessageID, FunctionCallback> ResponderMap;
71+
using ProcessorMap = std::map<TMessageType, FunctionCallback>;
72+
using ResponderMap = std::map<MessageID, FunctionCallback>;
7373

7474
Router()
7575
{

source/bootil/include/Bootil/Types/String.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ inline BString Get##_name_( BString str ) { _name_( str ); return str; }
1010

1111
namespace Bootil
1212
{
13-
typedef std::string BString;
14-
typedef std::wstring WString;
13+
using BString = std::string;
14+
using WString = std::wstring;
1515

1616
namespace String
1717
{
18-
typedef std::vector<BString> List;
19-
typedef std::map<BString, BString> Map;
20-
typedef std::list<BString> Lines;
18+
using List = std::vector<BString>;
19+
using Map = std::map<BString, BString>;
20+
using Lines = std::list<BString>;
2121

2222
namespace Convert
2323
{

source/bootil/include/Bootil/Utility/Compression.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ namespace Bootil
9292
void* m_pRead;
9393
void* m_Write;
9494

95-
typedef std::map<int, Entry> FileList;
95+
using FileList = std::map<int, Entry>;
9696
FileList m_Files;
9797
};
9898
}

source/bootil/include/Bootil/Utility/PackFile.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ namespace Bootil
2626
int iLength;
2727
};
2828

29-
typedef std::map< Bootil::BString, FileEntry > FileMap;
29+
using FileMap = std::map< Bootil::BString, FileEntry >;
3030

3131
FileMap m_FileMap;
3232
};

source/bootil/src/Bootil/Console/Console.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ namespace Bootil
137137

138138
struct PosInfo
139139
{
140-
typedef std::stack<PosInfo> Stack;
140+
using Stack = std::stack<PosInfo>;
141141
int x;
142142
int y;
143143
};

source/detouring/customclassproxy.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@
5252

5353
namespace Detouring
5454
{
55-
typedef std::unordered_map<void *, Member> CacheMap;
56-
typedef std::unordered_map<void *, Detouring::Hook> HookMap;
55+
using CacheMap = std::unordered_map<void *, Member>;
56+
using HookMap = std::unordered_map<void *, Detouring::Hook>;
5757

5858
template<typename Target, typename Substitute>
5959
class ClassProxy

0 commit comments

Comments
 (0)