Sfoglia il codice sorgente

List: replace size type from unsigned to signed | Remove unused includes [cache clear] (#2942)

Related: https://github.com/urho3d/Urho3D/issues/2940
1vanK 3 anni fa
parent
commit
088aa43e50

+ 2 - 0
Source/Urho3D/Container/Allocator.h

@@ -9,6 +9,8 @@
 #include <Urho3D/Urho3D.h>
 #endif
 
+#include "../Base/PrimitiveTypes.h"
+
 #include <cstddef>
 
 namespace Urho3D

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

@@ -340,7 +340,7 @@ public:
     }
 
     /// Resize the list by removing or adding items at the end.
-    void Resize(unsigned newSize)
+    void Resize(i32 newSize)
     {
         while (size_ > newSize)
             Pop();
@@ -395,7 +395,7 @@ public:
     const T& Back() const { return *(--End()); }
 
     /// Return number of elements.
-    unsigned Size() const { return size_; }
+    i32 Size() const { return size_; }
 
     /// Return whether list is empty.
     bool Empty() const { return size_ == 0; }

+ 1 - 1
Source/Urho3D/Container/ListBase.h

@@ -100,7 +100,7 @@ protected:
     /// Node allocator.
     AllocatorBlock* allocator_;
     /// Number of nodes.
-    unsigned size_;
+    i32 size_;
 };
 
 }

+ 0 - 1
Source/Urho3D/Graphics/Octree.h

@@ -3,7 +3,6 @@
 
 #pragma once
 
-#include "../Container/List.h"
 #include "../Core/Mutex.h"
 #include "../Graphics/Drawable.h"
 #include "../Graphics/OctreeQuery.h"

+ 0 - 1
Source/Urho3D/Graphics/View.h

@@ -4,7 +4,6 @@
 #pragma once
 
 #include "../Container/HashSet.h"
-#include "../Container/List.h"
 #include "../Core/Object.h"
 #include "../Graphics/Batch.h"
 #include "../Graphics/Light.h"

+ 0 - 1
Source/Urho3D/IO/FileWatcher.h

@@ -3,7 +3,6 @@
 
 #pragma once
 
-#include "../Container/List.h"
 #include "../Core/Mutex.h"
 #include "../Core/Object.h"
 #include "../Core/Thread.h"

+ 0 - 1
Source/Urho3D/Resource/ResourceCache.h

@@ -6,7 +6,6 @@
 #pragma once
 
 #include "../Container/HashSet.h"
-#include "../Container/List.h"
 #include "../Core/Mutex.h"
 #include "../IO/File.h"
 #include "../Resource/Resource.h"

+ 0 - 1
Source/Urho3D/UI/FontFace.h

@@ -4,7 +4,6 @@
 #pragma once
 
 #include "../Container/ArrayPtr.h"
-#include "../Container/List.h"
 #include "../Math/AreaAllocator.h"
 
 namespace Urho3D