Browse Source

Manual typedef to using upgrade.

Eugene Kozlov 8 years ago
parent
commit
efe6ec17e2

+ 2 - 2
Source/Urho3D/Container/HashMap.h

@@ -37,8 +37,8 @@ namespace Urho3D
 template <class T, class U> class HashMap : public HashBase
 template <class T, class U> class HashMap : public HashBase
 {
 {
 public:
 public:
-    typedef T KeyType;
-    typedef U ValueType;
+    using KeyType = T;
+    using ValueType = U;
 
 
     /// Hash map key-value pair with const key.
     /// Hash map key-value pair with const key.
     class KeyValue
     class KeyValue

+ 2 - 2
Source/Urho3D/Core/Object.h

@@ -66,8 +66,8 @@ private:
 
 
 #define URHO3D_OBJECT(typeName, baseTypeName) \
 #define URHO3D_OBJECT(typeName, baseTypeName) \
     public: \
     public: \
-        typedef typeName ClassName; \
-        typedef baseTypeName BaseClassName; \
+        using ClassName = typeName; \
+        using BaseClassName = baseTypeName; \
         virtual Urho3D::StringHash GetType() const { return GetTypeInfoStatic()->GetType(); } \
         virtual Urho3D::StringHash GetType() const { return GetTypeInfoStatic()->GetType(); } \
         virtual const Urho3D::String& GetTypeName() const { return GetTypeInfoStatic()->GetTypeName(); } \
         virtual const Urho3D::String& GetTypeName() const { return GetTypeInfoStatic()->GetTypeName(); } \
         virtual const Urho3D::TypeInfo* GetTypeInfo() const { return GetTypeInfoStatic(); } \
         virtual const Urho3D::TypeInfo* GetTypeInfo() const { return GetTypeInfoStatic(); } \

+ 1 - 1
Source/Urho3D/Core/Thread.h

@@ -30,7 +30,7 @@
 
 
 #ifndef _WIN32
 #ifndef _WIN32
 #include <pthread.h>
 #include <pthread.h>
-typedef pthread_t ThreadID;
+using ThreadID = pthread_t;
 #else
 #else
 using ThreadID = unsigned;
 using ThreadID = unsigned;
 #endif
 #endif

+ 1 - 1
Source/Urho3D/Navigation/CrowdManager.h

@@ -25,7 +25,7 @@
 #include "../Scene/Component.h"
 #include "../Scene/Component.h"
 
 
 #ifdef DT_POLYREF64
 #ifdef DT_POLYREF64
-typedef uint64_t dtPolyRef;
+using dtPolyRef = uint64_t;
 #else
 #else
 using dtPolyRef = unsigned int;
 using dtPolyRef = unsigned int;
 #endif
 #endif

+ 1 - 1
Source/Urho3D/Navigation/NavigationMesh.h

@@ -29,7 +29,7 @@
 #include "../Scene/Component.h"
 #include "../Scene/Component.h"
 
 
 #ifdef DT_POLYREF64
 #ifdef DT_POLYREF64
-typedef uint64_t dtPolyRef;
+using dtPolyRef = uint64_t;
 #else
 #else
 using dtPolyRef = unsigned int;
 using dtPolyRef = unsigned int;
 #endif
 #endif