Browse Source

Use PODVector more extensively.
Moved Color class to Core library.

Lasse Öörni 14 years ago
parent
commit
f60321b20f
80 changed files with 586 additions and 610 deletions
  1. 4 2
      Docs/Reference.dox
  2. 1 1
      Docs/Urho3D.dox
  3. 3 3
      Engine/Audio/Audio.cpp
  4. 2 2
      Engine/Audio/Audio.h
  5. 0 1
      Engine/Audio/Precompiled.h
  6. 4 4
      Engine/Container/Allocator.h
  7. 0 365
      Engine/Container/PODVector.h
  8. 337 0
      Engine/Container/Vector.h
  9. 2 2
      Engine/Core/AreaAllocator.cpp
  10. 1 1
      Engine/Core/AreaAllocator.h
  11. 0 0
      Engine/Core/Color.cpp
  12. 0 0
      Engine/Core/Color.h
  13. 12 12
      Engine/Core/Context.cpp
  14. 11 11
      Engine/Core/Context.h
  15. 1 1
      Engine/Core/Object.cpp
  16. 0 1
      Engine/Core/Precompiled.h
  17. 2 2
      Engine/Core/Profiler.cpp
  18. 6 6
      Engine/Core/Profiler.h
  19. 0 1
      Engine/Core/Variant.h
  20. 25 7
      Engine/Engine/APITemplates.h
  21. 1 1
      Engine/Engine/GraphicsAPI.cpp
  22. 1 1
      Engine/Engine/PhysicsAPI.cpp
  23. 0 1
      Engine/Engine/Precompiled.h
  24. 3 3
      Engine/Engine/UIAPI.cpp
  25. 3 3
      Engine/Graphics/AnimatedModel.cpp
  26. 4 4
      Engine/Graphics/AnimatedModel.h
  27. 1 1
      Engine/Graphics/AnimationState.h
  28. 1 1
      Engine/Graphics/Batch.cpp
  29. 0 1
      Engine/Graphics/Batch.h
  30. 2 2
      Engine/Graphics/BillboardSet.cpp
  31. 2 2
      Engine/Graphics/BillboardSet.h
  32. 4 4
      Engine/Graphics/DebugRenderer.cpp
  33. 2 2
      Engine/Graphics/DebugRenderer.h
  34. 2 2
      Engine/Graphics/Geometry.h
  35. 8 8
      Engine/Graphics/Graphics.cpp
  36. 4 4
      Engine/Graphics/Graphics.h
  37. 2 2
      Engine/Graphics/Model.cpp
  38. 3 3
      Engine/Graphics/Model.h
  39. 2 3
      Engine/Graphics/OctreeQuery.h
  40. 2 2
      Engine/Graphics/ParticleEmitter.cpp
  41. 1 1
      Engine/Graphics/ParticleEmitter.h
  42. 0 1
      Engine/Graphics/Precompiled.h
  43. 2 2
      Engine/Graphics/Renderer.cpp
  44. 1 1
      Engine/Graphics/StaticModel.h
  45. 2 2
      Engine/Graphics/VertexDeclaration.cpp
  46. 2 3
      Engine/Graphics/VertexDeclaration.h
  47. 1 1
      Engine/IO/FileSystem.cpp
  48. 0 1
      Engine/IO/Precompiled.h
  49. 0 1
      Engine/IO/Serializer.h
  50. 0 1
      Engine/Network/Precompiled.h
  51. 8 8
      Engine/Physics/PhysicsWorld.cpp
  52. 3 3
      Engine/Physics/PhysicsWorld.h
  53. 0 1
      Engine/Physics/Precompiled.h
  54. 3 3
      Engine/Physics/RigidBody.cpp
  55. 0 1
      Engine/Resource/Precompiled.h
  56. 1 1
      Engine/Resource/ResourceCache.cpp
  57. 4 4
      Engine/Resource/ResourceCache.h
  58. 1 1
      Engine/Scene/Component.cpp
  59. 4 4
      Engine/Scene/Component.h
  60. 5 5
      Engine/Scene/Node.cpp
  61. 10 10
      Engine/Scene/Node.h
  62. 0 1
      Engine/Script/Precompiled.h
  63. 1 1
      Engine/UI/DropDownList.cpp
  64. 1 1
      Engine/UI/DropDownList.h
  65. 2 2
      Engine/UI/FileSelector.cpp
  66. 1 1
      Engine/UI/Font.cpp
  67. 2 2
      Engine/UI/LineEdit.cpp
  68. 3 3
      Engine/UI/ListView.cpp
  69. 2 2
      Engine/UI/ListView.h
  70. 0 1
      Engine/UI/Precompiled.h
  71. 1 1
      Engine/UI/Text.cpp
  72. 6 6
      Engine/UI/Text.h
  73. 14 14
      Engine/UI/UI.cpp
  74. 0 1
      Engine/UI/UIBatch.h
  75. 14 14
      Engine/UI/UIElement.cpp
  76. 5 5
      Engine/UI/UIElement.h
  77. 24 24
      Tools/AssetImporter/AssetImporter.cpp
  78. 1 1
      Tools/OgreImporter/OgreImporter.cpp
  79. 2 2
      Tools/OgreImporter/OgreImporterUtils.h
  80. 1 1
      Tools/ShaderCompiler/ShaderCompiler.cpp

+ 4 - 2
Docs/Reference.dox

@@ -1,6 +1,6 @@
 /**
 /**
 
 
-\page DataTypes Basic data types
+\page Containers Container types
 
 
 Urho3D implements its own string type and template containers instead of using STL. The rationale for this consists of the following:
 Urho3D implements its own string type and template containers instead of using STL. The rationale for this consists of the following:
 
 
@@ -9,10 +9,12 @@ Urho3D implements its own string type and template containers instead of using S
 - Reduced compile time.
 - Reduced compile time.
 - Straightforward naming and implementation that aids in debugging and profiling.
 - Straightforward naming and implementation that aids in debugging and profiling.
 - Convenient member functions can be added, for example String::Split() or Vector::Compact().
 - Convenient member functions can be added, for example String::Split() or Vector::Compact().
-- Consistency with the rest of the classes, see \ref CodingConvention "Coding conventions".
+- Consistency with the rest of the classes, see \ref CodingConventions "Coding conventions".
 
 
 The classes in question are String, Vector, PODVector, List, Map and Set. PODVector is only to be used when the elements of the vector need no construction or destruction and can be moved with a block memory copy.
 The classes in question are String, Vector, PODVector, List, Map and Set. PODVector is only to be used when the elements of the vector need no construction or destruction and can be moved with a block memory copy.
 
 
+List, Map and Set use a fixed-size allocator internally. This can also be used by the application, either by using the procedural functions AllocatorInitialize(), AllocatorUninitialize(), AllocatorReserve() and AllocatorFree(), or through the template class Allocator.
+
 In script, the String class is exposed as it is. The template containers can not be directly exposed to script, but instead a template Array type exists, which behaves like a Vector, but does not expose iterators. In addition the VariantMap is available, which is a Map<ShortStringHash, Variant>.
 In script, the String class is exposed as it is. The template containers can not be directly exposed to script, but instead a template Array type exists, which behaves like a Vector, but does not expose iterators. In addition the VariantMap is available, which is a Map<ShortStringHash, Variant>.
 
 
 
 

+ 1 - 1
Docs/Urho3D.dox

@@ -15,7 +15,7 @@ For getting started, see:
 
 
 For further reference, see:
 For further reference, see:
 
 
-\ref DataTypes "Basic data types" <br>
+\ref Containers "Container types" <br>
 \ref ObjectTypes "Object types and factories" <br>
 \ref ObjectTypes "Object types and factories" <br>
 \ref Subsystems "Subsystems" <br>
 \ref Subsystems "Subsystems" <br>
 \ref Events "Events" <br>
 \ref Events "Events" <br>

+ 3 - 3
Engine/Audio/Audio.cpp

@@ -262,7 +262,7 @@ void Audio::SetListenerTransform(const Vector3& position, const Quaternion& rota
 
 
 void Audio::StopSound(Sound* soundClip)
 void Audio::StopSound(Sound* soundClip)
 {
 {
-    for (Vector<SoundSource*>::Iterator i = soundSources_.Begin(); i != soundSources_.End(); ++i)
+    for (PODVector<SoundSource*>::Iterator i = soundSources_.Begin(); i != soundSources_.End(); ++i)
     {
     {
         if ((*i)->GetSound() == soundClip)
         if ((*i)->GetSound() == soundClip)
             (*i)->Stop();
             (*i)->Stop();
@@ -293,7 +293,7 @@ void Audio::RemoveSoundSource(SoundSource* channel)
 {
 {
     MutexLock Lock(audioMutex_);
     MutexLock Lock(audioMutex_);
     
     
-    for (Vector<SoundSource*>::Iterator i = soundSources_.Begin(); i != soundSources_.End(); ++i)
+    for (PODVector<SoundSource*>::Iterator i = soundSources_.Begin(); i != soundSources_.End(); ++i)
     {
     {
         if (*i == channel)
         if (*i == channel)
         {
         {
@@ -398,7 +398,7 @@ void Audio::MixOutput(void *dest, unsigned bytes)
     int* clipPtr = clipBuffer_.GetPtr();
     int* clipPtr = clipBuffer_.GetPtr();
     
     
     // Mix samples to clip buffer
     // Mix samples to clip buffer
-    for (Vector<SoundSource*>::Iterator i = soundSources_.Begin(); i != soundSources_.End(); ++i)
+    for (PODVector<SoundSource*>::Iterator i = soundSources_.Begin(); i != soundSources_.End(); ++i)
         (*i)->Mix(clipPtr, mixSamples, mixRate_, stereo_, interpolate_);
         (*i)->Mix(clipPtr, mixSamples, mixRate_, stereo_, interpolate_);
     
     
     // Copy output from clip buffer to destination
     // Copy output from clip buffer to destination

+ 2 - 2
Engine/Audio/Audio.h

@@ -91,7 +91,7 @@ public:
     /// Return listener rotation
     /// Return listener rotation
     const Quaternion& GetListenerRotation() const { return listenerRotation_; }
     const Quaternion& GetListenerRotation() const { return listenerRotation_; }
     /// Return all sound sources
     /// Return all sound sources
-    const Vector<SoundSource*>& GetSoundSources() const { return soundSources_; }
+    const PODVector<SoundSource*>& GetSoundSources() const { return soundSources_; }
     
     
     /// Add a sound source to keep track of. Called by SoundSource
     /// Add a sound source to keep track of. Called by SoundSource
     void AddSoundSource(SoundSource* soundSource);
     void AddSoundSource(SoundSource* soundSource);
@@ -144,7 +144,7 @@ private:
     /// Master gain by sound source type
     /// Master gain by sound source type
     float masterGain_[MAX_SOUND_TYPES];
     float masterGain_[MAX_SOUND_TYPES];
     /// Sound sources
     /// Sound sources
-    Vector<SoundSource*> soundSources_;
+    PODVector<SoundSource*> soundSources_;
     /// Listener position
     /// Listener position
     Vector3 listenerPosition_;
     Vector3 listenerPosition_;
     /// Listener rotation
     /// Listener rotation

+ 0 - 1
Engine/Audio/Precompiled.h

@@ -24,7 +24,6 @@
 #pragma once
 #pragma once
 
 
 #include "Map.h"
 #include "Map.h"
-#include "PODVector.h"
 #include "Set.h"
 #include "Set.h"
 #include "StringBase.h"
 #include "StringBase.h"
 
 

+ 4 - 4
Engine/Container/Allocator.h

@@ -77,8 +77,8 @@ public:
         AllocatorUninitialize(allocator_);
         AllocatorUninitialize(allocator_);
     }
     }
     
     
-    /// Allocate and default-construct an object
-    T* Allocate()
+    /// Reserve and default-construct an object
+    T* Reserve()
     {
     {
         if (!allocator_)
         if (!allocator_)
             allocator_ = AllocatorInitialize(sizeof(T));
             allocator_ = AllocatorInitialize(sizeof(T));
@@ -88,8 +88,8 @@ public:
         return newObject;
         return newObject;
     }
     }
     
     
-    /// Allocate and copy-construct an object
-    T* Allocate(const T& object)
+    /// Reserve and copy-construct an object
+    T* Reserve(const T& object)
     {
     {
         if (!allocator_)
         if (!allocator_)
             allocator_ = AllocatorInitialize(sizeof(T));
             allocator_ = AllocatorInitialize(sizeof(T));

+ 0 - 365
Engine/Container/PODVector.h

@@ -1,365 +0,0 @@
-//
-// Urho3D Engine
-// Copyright (c) 2008-2011 Lasse Öörni
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-//
-
-#pragma once
-
-#include "VectorBase.h"
-
-#include <cstring>
-
-/// Vector template class for POD types. Does not call constructors or destructors and uses block move
-template <class T> class PODVector : public VectorBase
-{
-public:
-    typedef RandomAccessIterator<T> Iterator;
-    typedef RandomAccessConstIterator<T> ConstIterator;
-    
-    /// Construct empty
-    PODVector()
-    {
-    }
-    
-    /// Construct with initial size
-    explicit PODVector(unsigned size)
-    {
-        Resize(size);
-    }
-    
-    /// Construct from another vector
-    PODVector(const PODVector<T>& vector)
-    {
-        *this = vector;
-    }
-    
-    /// Destruct
-    ~PODVector()
-    {
-        delete[] buffer_;
-    }
-    
-    /// Assign from another vector
-    PODVector<T>& operator = (const PODVector<T>& rhs)
-    {
-        Resize(rhs.size_);
-        CopyElements(GetBuffer(), rhs.GetBuffer(), rhs.size_);
-        
-        return *this;
-    }
-    
-    /// Add-assign an element
-    PODVector<T>& operator += (const T& rhs)
-    {
-        Push(rhs);
-        return *this;
-    }
-    
-    /// Add-assign another vector
-    PODVector<T>& operator += (const PODVector<T>& rhs)
-    {
-        Push(rhs);
-        return *this;
-    }
-    
-    /// Add an element
-    PODVector<T> operator + (const T& rhs) const
-    {
-        PODVector<T> ret(*this);
-        ret.Push(rhs);
-        
-        return ret;
-    }
-    
-    /// Add another vector
-    PODVector<T> operator + (const PODVector<T>& rhs) const
-    {
-        PODVector<T> ret(*this);
-        ret.Push(rhs);
-        
-        return ret;
-    }
-    
-    /// Test for equality with another vector
-    bool operator == (const PODVector<T>& rhs) const
-    {
-        if (rhs.size_ != size_)
-            return false;
-        
-        T* buffer = GetBuffer();
-        T* rhsBuffer = rhs.GetBuffer();
-        for (unsigned i = 0; i < size_; ++i)
-        {
-            if (buffer[i] != rhsBuffer[i])
-                return false;
-        }
-        
-        return true;
-    }
-    
-    /// Test for inequality with another vector
-    bool operator != (const PODVector<T>& rhs) const
-    {
-        if (rhs.size_ != size_)
-            return true;
-        
-        T* buffer = GetBuffer();
-        T* rhsBuffer = rhs.GetBuffer();
-        for (unsigned i = 0; i < size_; ++i)
-        {
-            if (buffer[i] != rhsBuffer[i])
-                return true;
-        }
-        
-        return false;
-    }
-    
-    /// Return element at index
-    T& operator [] (unsigned index) { return GetBuffer()[index]; }
-    /// Return const element at index
-    const T& operator [] (unsigned index) const { return GetBuffer()[index]; }
-    /// Return element at index
-    T& At(unsigned index) { return GetBuffer()[index]; }
-    /// Return const element at index
-    const T& At(unsigned index) const { return GetBuffer()[index]; }
-    
-    /// Add an element at the end
-    void Push(const T& value)
-    {
-        if (size_ < capacity_)
-            ++size_;
-        else
-            Resize(size_ + 1);
-        Back() = value;
-    }
-    
-    /// Add another vector at the end
-    void Push(const PODVector<T>& vector)
-    {
-        unsigned oldSize = size_;
-        Resize(size_ + vector.size_);
-        CopyElements(GetBuffer() + oldSize, vector.GetBuffer(), vector.size_);
-    }
-    
-    /// Remove the last element
-    void Pop()
-    {
-        if (size_)
-            Resize(size_ - 1);
-    }
-    
-    /// Insert an element at position
-    void Insert(unsigned pos, const T& value)
-    {
-        if (pos > size_)
-            pos = size_;
-        
-        unsigned oldSize = size_;
-        Resize(size_ + 1);
-        MoveRange(pos + 1, pos, oldSize - pos);
-        GetBuffer()[pos] = value;
-    }
-    
-    /// Insert another vector at position
-    void Insert(unsigned pos, const PODVector<T>& vector)
-    {
-        if (pos > size_)
-            pos = size_;
-        
-        unsigned oldSize = size_;
-        Resize(size_ + vector.size_);
-        MoveRange(pos + vector.size_, pos, oldSize - pos);
-        CopyElements(GetBuffer() + pos, vector.GetBuffer(), vector.size_);
-    }
-    
-    /// Insert an element using an iterator
-    Iterator Insert(const Iterator& dest, const T& value)
-    {
-        unsigned pos = dest - Begin();
-        if (pos > size_)
-            pos = size_;
-        Insert(pos, value);
-        
-        return Begin() + pos;
-    }
-    
-    /// Insert a vector using an iterator
-    Iterator Insert(const Iterator& dest, const PODVector<T>& vector)
-    {
-        unsigned pos = dest - Begin();
-        if (pos > size_)
-            pos = size_;
-        Insert(pos, vector);
-        
-        return Begin() + pos;
-    }
-    
-    /// Insert a vector partially using iterators
-    Iterator Insert(const Iterator& dest, const Iterator& start, const Iterator& end)
-    {
-        unsigned pos = dest - Begin();
-        if (pos > size_)
-            pos = size_;
-        unsigned length = end - start;
-        Resize(size_ + length);
-        MoveRange(pos + length, pos, size_ - pos - length);
-        CopyElements(GetBuffer() + pos, &(*start), length);
-        
-        return Begin() + pos;
-    }
-    
-    /// Erase a range of elements
-    void Erase(unsigned pos, unsigned length = 1)
-    {
-        // Return if the range is illegal
-        if ((!length) || (pos + length > size_))
-            return;
-        
-        MoveRange(pos, pos + length, size_ - pos - length);
-        Resize(size_ - length);
-    }
-    
-    /// Erase an element using an iterator
-    Iterator Erase(const Iterator& it)
-    {
-        unsigned pos = it - Begin();
-        if (pos >= size_)
-            return End();
-        Erase(pos);
-        
-        return Begin() + pos;
-    }
-    
-    /// Erase a range of values using iterators
-    Iterator Erase(const Iterator& start, const Iterator& end)
-    {
-        unsigned pos = start - Begin();
-        if (pos >= size_)
-            return End();
-        unsigned length = end - start;
-        Erase(pos, length);
-        
-        return Begin() + pos;
-    }
-    
-    /// Clear the vector
-    void Clear()
-    {
-        Resize(0);
-    }
-    
-    /// Resize the vector
-    void Resize(unsigned newSize)
-    {
-        if (newSize > capacity_)
-        {
-            if (!capacity_)
-                capacity_ = newSize;
-            else
-            {
-                while (capacity_ < newSize)
-                    capacity_ += (capacity_ + 1) >> 1;
-            }
-            
-            unsigned char* newBuffer = new unsigned char[capacity_ * sizeof(T)];
-            // Move the data into the new buffer and delete the old
-            if (buffer_)
-            {
-                CopyElements(reinterpret_cast<T*>(newBuffer), GetBuffer(), size_);
-                delete[] buffer_;
-            }
-            buffer_ = newBuffer;
-        }
-        
-        size_ = newSize;
-    }
-    
-    /// Set new capacity
-    void Reserve(unsigned newCapacity)
-    {
-        if (newCapacity < size_)
-            newCapacity = size_;
-        
-        if (newCapacity != capacity_)
-        {
-            unsigned char* newBuffer = 0;
-            capacity_ = newCapacity;
-            
-            if (capacity_)
-            {
-                newBuffer = new unsigned char[capacity_ * sizeof(T)];
-                // Move the data into the new buffer
-                CopyElements(reinterpret_cast<T*>(newBuffer), GetBuffer(), size_);
-            }
-            
-            // Delete the old buffer
-            delete[] buffer_;
-            buffer_ = newBuffer;
-        }
-    }
-    
-    /// Reallocate so that no extra memory is used
-    void Compact()
-    {
-        Reserve(size_);
-    }
-    
-    /// Return iterator to the beginning
-    Iterator Begin() { return Iterator(GetBuffer()); }
-    /// Return const iterator to the beginning
-    ConstIterator Begin() const { return ConstIterator(GetBuffer()); }
-    /// Return iterator to the end
-    Iterator End() { return Iterator(GetBuffer() + size_); }
-    /// Return const iterator to the end
-    ConstIterator End() const { return ConstIterator(GetBuffer() + size_); }
-    /// Return first element
-    T& Front() { return GetBuffer()[0]; }
-    /// Return const first element
-    const T& Front() const { return GetBuffer()[0]; }
-    /// Return last element
-    T& Back() { return GetBuffer()[size_ - 1]; }
-    /// Return const last element
-    const T& Back() const { return GetBuffer()[size_ - 1]; }
-    /// Return size of vector
-    unsigned Size() const { return size_; }
-    /// Return capacity of vector
-    unsigned Capacity() const { return capacity_; }
-    /// Return whether vector is empty
-    bool Empty() const { return size_ == 0; }
-    
-private:
-    /// Return the buffer with right type
-    T* GetBuffer() const { return reinterpret_cast<T*>(buffer_); }
-    
-    /// Move a range of elements within the vector
-    void MoveRange(unsigned dest, unsigned src, unsigned count)
-    {
-        if (count)
-            memmove(GetBuffer() + dest, GetBuffer() + src, count * sizeof(T));
-    }
-    
-    /// Copy elements from one buffer to another
-    static void CopyElements(T* dest, const T* src, unsigned count)
-    {
-        if (count)
-            memcpy(dest, src, count * sizeof(T));
-    }
-};

+ 337 - 0
Engine/Container/Vector.h

@@ -411,3 +411,340 @@ private:
             (dest + i)->~T();
             (dest + i)->~T();
     }
     }
 };
 };
+
+/// Vector template class for POD types. Does not call constructors or destructors and uses block move
+template <class T> class PODVector : public VectorBase
+{
+public:
+    typedef RandomAccessIterator<T> Iterator;
+    typedef RandomAccessConstIterator<T> ConstIterator;
+    
+    /// Construct empty
+    PODVector()
+    {
+    }
+    
+    /// Construct with initial size
+    explicit PODVector(unsigned size)
+    {
+        Resize(size);
+    }
+    
+    /// Construct from another vector
+    PODVector(const PODVector<T>& vector)
+    {
+        *this = vector;
+    }
+    
+    /// Destruct
+    ~PODVector()
+    {
+        delete[] buffer_;
+    }
+    
+    /// Assign from another vector
+    PODVector<T>& operator = (const PODVector<T>& rhs)
+    {
+        Resize(rhs.size_);
+        CopyElements(GetBuffer(), rhs.GetBuffer(), rhs.size_);
+        
+        return *this;
+    }
+    
+    /// Add-assign an element
+    PODVector<T>& operator += (const T& rhs)
+    {
+        Push(rhs);
+        return *this;
+    }
+    
+    /// Add-assign another vector
+    PODVector<T>& operator += (const PODVector<T>& rhs)
+    {
+        Push(rhs);
+        return *this;
+    }
+    
+    /// Add an element
+    PODVector<T> operator + (const T& rhs) const
+    {
+        PODVector<T> ret(*this);
+        ret.Push(rhs);
+        
+        return ret;
+    }
+    
+    /// Add another vector
+    PODVector<T> operator + (const PODVector<T>& rhs) const
+    {
+        PODVector<T> ret(*this);
+        ret.Push(rhs);
+        
+        return ret;
+    }
+    
+    /// Test for equality with another vector
+    bool operator == (const PODVector<T>& rhs) const
+    {
+        if (rhs.size_ != size_)
+            return false;
+        
+        T* buffer = GetBuffer();
+        T* rhsBuffer = rhs.GetBuffer();
+        for (unsigned i = 0; i < size_; ++i)
+        {
+            if (buffer[i] != rhsBuffer[i])
+                return false;
+        }
+        
+        return true;
+    }
+    
+    /// Test for inequality with another vector
+    bool operator != (const PODVector<T>& rhs) const
+    {
+        if (rhs.size_ != size_)
+            return true;
+        
+        T* buffer = GetBuffer();
+        T* rhsBuffer = rhs.GetBuffer();
+        for (unsigned i = 0; i < size_; ++i)
+        {
+            if (buffer[i] != rhsBuffer[i])
+                return true;
+        }
+        
+        return false;
+    }
+    
+    /// Return element at index
+    T& operator [] (unsigned index) { return GetBuffer()[index]; }
+    /// Return const element at index
+    const T& operator [] (unsigned index) const { return GetBuffer()[index]; }
+    /// Return element at index
+    T& At(unsigned index) { return GetBuffer()[index]; }
+    /// Return const element at index
+    const T& At(unsigned index) const { return GetBuffer()[index]; }
+    
+    /// Add an element at the end
+    void Push(const T& value)
+    {
+        if (size_ < capacity_)
+            ++size_;
+        else
+            Resize(size_ + 1);
+        Back() = value;
+    }
+    
+    /// Add another vector at the end
+    void Push(const PODVector<T>& vector)
+    {
+        unsigned oldSize = size_;
+        Resize(size_ + vector.size_);
+        CopyElements(GetBuffer() + oldSize, vector.GetBuffer(), vector.size_);
+    }
+    
+    /// Remove the last element
+    void Pop()
+    {
+        if (size_)
+            Resize(size_ - 1);
+    }
+    
+    /// Insert an element at position
+    void Insert(unsigned pos, const T& value)
+    {
+        if (pos > size_)
+            pos = size_;
+        
+        unsigned oldSize = size_;
+        Resize(size_ + 1);
+        MoveRange(pos + 1, pos, oldSize - pos);
+        GetBuffer()[pos] = value;
+    }
+    
+    /// Insert another vector at position
+    void Insert(unsigned pos, const PODVector<T>& vector)
+    {
+        if (pos > size_)
+            pos = size_;
+        
+        unsigned oldSize = size_;
+        Resize(size_ + vector.size_);
+        MoveRange(pos + vector.size_, pos, oldSize - pos);
+        CopyElements(GetBuffer() + pos, vector.GetBuffer(), vector.size_);
+    }
+    
+    /// Insert an element using an iterator
+    Iterator Insert(const Iterator& dest, const T& value)
+    {
+        unsigned pos = dest - Begin();
+        if (pos > size_)
+            pos = size_;
+        Insert(pos, value);
+        
+        return Begin() + pos;
+    }
+    
+    /// Insert a vector using an iterator
+    Iterator Insert(const Iterator& dest, const PODVector<T>& vector)
+    {
+        unsigned pos = dest - Begin();
+        if (pos > size_)
+            pos = size_;
+        Insert(pos, vector);
+        
+        return Begin() + pos;
+    }
+    
+    /// Insert a vector partially using iterators
+    Iterator Insert(const Iterator& dest, const Iterator& start, const Iterator& end)
+    {
+        unsigned pos = dest - Begin();
+        if (pos > size_)
+            pos = size_;
+        unsigned length = end - start;
+        Resize(size_ + length);
+        MoveRange(pos + length, pos, size_ - pos - length);
+        CopyElements(GetBuffer() + pos, &(*start), length);
+        
+        return Begin() + pos;
+    }
+    
+    /// Erase a range of elements
+    void Erase(unsigned pos, unsigned length = 1)
+    {
+        // Return if the range is illegal
+        if ((!length) || (pos + length > size_))
+            return;
+        
+        MoveRange(pos, pos + length, size_ - pos - length);
+        Resize(size_ - length);
+    }
+    
+    /// Erase an element using an iterator
+    Iterator Erase(const Iterator& it)
+    {
+        unsigned pos = it - Begin();
+        if (pos >= size_)
+            return End();
+        Erase(pos);
+        
+        return Begin() + pos;
+    }
+    
+    /// Erase a range of values using iterators
+    Iterator Erase(const Iterator& start, const Iterator& end)
+    {
+        unsigned pos = start - Begin();
+        if (pos >= size_)
+            return End();
+        unsigned length = end - start;
+        Erase(pos, length);
+        
+        return Begin() + pos;
+    }
+    
+    /// Clear the vector
+    void Clear()
+    {
+        Resize(0);
+    }
+    
+    /// Resize the vector
+    void Resize(unsigned newSize)
+    {
+        if (newSize > capacity_)
+        {
+            if (!capacity_)
+                capacity_ = newSize;
+            else
+            {
+                while (capacity_ < newSize)
+                    capacity_ += (capacity_ + 1) >> 1;
+            }
+            
+            unsigned char* newBuffer = new unsigned char[capacity_ * sizeof(T)];
+            // Move the data into the new buffer and delete the old
+            if (buffer_)
+            {
+                CopyElements(reinterpret_cast<T*>(newBuffer), GetBuffer(), size_);
+                delete[] buffer_;
+            }
+            buffer_ = newBuffer;
+        }
+        
+        size_ = newSize;
+    }
+    
+    /// Set new capacity
+    void Reserve(unsigned newCapacity)
+    {
+        if (newCapacity < size_)
+            newCapacity = size_;
+        
+        if (newCapacity != capacity_)
+        {
+            unsigned char* newBuffer = 0;
+            capacity_ = newCapacity;
+            
+            if (capacity_)
+            {
+                newBuffer = new unsigned char[capacity_ * sizeof(T)];
+                // Move the data into the new buffer
+                CopyElements(reinterpret_cast<T*>(newBuffer), GetBuffer(), size_);
+            }
+            
+            // Delete the old buffer
+            delete[] buffer_;
+            buffer_ = newBuffer;
+        }
+    }
+    
+    /// Reallocate so that no extra memory is used
+    void Compact()
+    {
+        Reserve(size_);
+    }
+    
+    /// Return iterator to the beginning
+    Iterator Begin() { return Iterator(GetBuffer()); }
+    /// Return const iterator to the beginning
+    ConstIterator Begin() const { return ConstIterator(GetBuffer()); }
+    /// Return iterator to the end
+    Iterator End() { return Iterator(GetBuffer() + size_); }
+    /// Return const iterator to the end
+    ConstIterator End() const { return ConstIterator(GetBuffer() + size_); }
+    /// Return first element
+    T& Front() { return GetBuffer()[0]; }
+    /// Return const first element
+    const T& Front() const { return GetBuffer()[0]; }
+    /// Return last element
+    T& Back() { return GetBuffer()[size_ - 1]; }
+    /// Return const last element
+    const T& Back() const { return GetBuffer()[size_ - 1]; }
+    /// Return size of vector
+    unsigned Size() const { return size_; }
+    /// Return capacity of vector
+    unsigned Capacity() const { return capacity_; }
+    /// Return whether vector is empty
+    bool Empty() const { return size_ == 0; }
+    
+private:
+    /// Return the buffer with right type
+    T* GetBuffer() const { return reinterpret_cast<T*>(buffer_); }
+    
+    /// Move a range of elements within the vector
+    void MoveRange(unsigned dest, unsigned src, unsigned count)
+    {
+        if (count)
+            memmove(GetBuffer() + dest, GetBuffer() + src, count * sizeof(T));
+    }
+    
+    /// Copy elements from one buffer to another
+    static void CopyElements(T* dest, const T* src, unsigned count)
+    {
+        if (count)
+            memcpy(dest, src, count * sizeof(T));
+    }
+};

+ 2 - 2
Engine/Core/AreaAllocator.cpp

@@ -44,10 +44,10 @@ bool AreaAllocator::Allocate(int width, int height, int& x, int& y)
     if (height < 0)
     if (height < 0)
         height = 0;
         height = 0;
     
     
-    Vector<IntRect>::Iterator best = freeAreas_.End();
+    PODVector<IntRect>::Iterator best = freeAreas_.End();
     int bestFreeArea = M_MAX_INT;
     int bestFreeArea = M_MAX_INT;
     
     
-    for (Vector<IntRect>::Iterator i = freeAreas_.Begin(); i != freeAreas_.End(); ++i)
+    for (PODVector<IntRect>::Iterator i = freeAreas_.Begin(); i != freeAreas_.End(); ++i)
     {
     {
         int freeWidth = i->right_ - i->left_;
         int freeWidth = i->right_ - i->left_;
         int freeHeight = i->bottom_ - i->top_;
         int freeHeight = i->bottom_ - i->top_;

+ 1 - 1
Engine/Core/AreaAllocator.h

@@ -45,5 +45,5 @@ private:
     void Cleanup();
     void Cleanup();
     
     
     /// Free rectangles
     /// Free rectangles
-    Vector<IntRect> freeAreas_;
+    PODVector<IntRect> freeAreas_;
 };
 };

+ 0 - 0
Engine/Math/Color.cpp → Engine/Core/Color.cpp


+ 0 - 0
Engine/Math/Color.h → Engine/Core/Color.h


+ 12 - 12
Engine/Core/Context.cpp

@@ -96,8 +96,8 @@ void Context::CopyBaseAttributes(ShortStringHash baseType, ShortStringHash deriv
 
 
 void Context::AddEventReceiver(Object* receiver, StringHash eventType)
 void Context::AddEventReceiver(Object* receiver, StringHash eventType)
 {
 {
-    Vector<Object*>& receivers = receivers_[eventType];
-    for (Vector<Object*>::ConstIterator j = receivers.Begin(); j != receivers.End(); ++j)
+    PODVector<Object*>& receivers = receivers_[eventType];
+    for (PODVector<Object*>::ConstIterator j = receivers.Begin(); j != receivers.End(); ++j)
     {
     {
         // Check if already registered
         // Check if already registered
         if (*j == receiver)
         if (*j == receiver)
@@ -109,8 +109,8 @@ void Context::AddEventReceiver(Object* receiver, StringHash eventType)
 
 
 void Context::AddEventReceiver(Object* receiver, Object* sender, StringHash eventType)
 void Context::AddEventReceiver(Object* receiver, Object* sender, StringHash eventType)
 {
 {
-    Vector<Object*>& receivers = specificReceivers_[MakePair(sender, eventType)];
-    for (Vector<Object*>::ConstIterator j = receivers.Begin(); j != receivers.End(); ++j)
+    PODVector<Object*>& receivers = specificReceivers_[MakePair(sender, eventType)];
+    for (PODVector<Object*>::ConstIterator j = receivers.Begin(); j != receivers.End(); ++j)
     {
     {
         if (*j == receiver)
         if (*j == receiver)
             return;
             return;
@@ -121,14 +121,14 @@ void Context::AddEventReceiver(Object* receiver, Object* sender, StringHash even
 
 
 void Context::RemoveEventSender(Object* sender)
 void Context::RemoveEventSender(Object* sender)
 {
 {
-    for (Map<Pair<Object*, StringHash>, Vector<Object*> >::Iterator i = specificReceivers_.Begin();
+    for (Map<Pair<Object*, StringHash>, PODVector<Object*> >::Iterator i = specificReceivers_.Begin();
         i != specificReceivers_.End();)
         i != specificReceivers_.End();)
     {
     {
-        Map<Pair<Object*, StringHash>, Vector<Object*> >::Iterator current = i++;
+        Map<Pair<Object*, StringHash>, PODVector<Object*> >::Iterator current = i++;
         if (current->first_.first_ == sender)
         if (current->first_.first_ == sender)
         {
         {
-            Vector<Object*>& receivers = current->second_;
-            for (Vector<Object*>::Iterator j = receivers.Begin(); j != receivers.End(); ++j)
+            PODVector<Object*>& receivers = current->second_;
+            for (PODVector<Object*>::Iterator j = receivers.Begin(); j != receivers.End(); ++j)
             {
             {
                 if (*j)
                 if (*j)
                     (*j)->RemoveEventSender(sender);
                     (*j)->RemoveEventSender(sender);
@@ -140,11 +140,11 @@ void Context::RemoveEventSender(Object* sender)
 
 
 void Context::RemoveEventReceiver(Object* receiver, StringHash eventType)
 void Context::RemoveEventReceiver(Object* receiver, StringHash eventType)
 {
 {
-    Vector<Object*>* group = GetReceivers(eventType);
+    PODVector<Object*>* group = GetReceivers(eventType);
     if (!group)
     if (!group)
         return;
         return;
     
     
-    for (Vector<Object*>::Iterator i = group->Begin(); i != group->End(); ++i)
+    for (PODVector<Object*>::Iterator i = group->Begin(); i != group->End(); ++i)
     {
     {
         if (*i == receiver)
         if (*i == receiver)
         {
         {
@@ -163,11 +163,11 @@ void Context::RemoveEventReceiver(Object* receiver, StringHash eventType)
 
 
 void Context::RemoveEventReceiver(Object* receiver, Object* sender, StringHash eventType)
 void Context::RemoveEventReceiver(Object* receiver, Object* sender, StringHash eventType)
 {
 {
-    Vector<Object*>* group = GetReceivers(sender, eventType);
+    PODVector<Object*>* group = GetReceivers(sender, eventType);
     if (!group)
     if (!group)
         return;
         return;
     
     
-    for (Vector<Object*>::Iterator i = group->Begin(); i != group->End(); ++i)
+    for (PODVector<Object*>::Iterator i = group->Begin(); i != group->End(); ++i)
     {
     {
         if (*i == receiver)
         if (*i == receiver)
         {
         {

+ 11 - 11
Engine/Core/Context.h

@@ -84,8 +84,8 @@ public:
                 for (Set<Pair<Object*, StringHash> >::Iterator i = dirtySpecificReceivers_.Begin();
                 for (Set<Pair<Object*, StringHash> >::Iterator i = dirtySpecificReceivers_.Begin();
                     i != dirtySpecificReceivers_.End(); ++i)
                     i != dirtySpecificReceivers_.End(); ++i)
                 {
                 {
-                    Vector<Object*>& receivers = specificReceivers_[*i];
-                    for (Vector<Object*>::Iterator j = receivers.Begin(); j != receivers.End();)
+                    PODVector<Object*>& receivers = specificReceivers_[*i];
+                    for (PODVector<Object*>::Iterator j = receivers.Begin(); j != receivers.End();)
                     {
                     {
                         if (*j == 0)
                         if (*j == 0)
                             j = receivers.Erase(j);
                             j = receivers.Erase(j);
@@ -100,8 +100,8 @@ public:
             {
             {
                 for (Set<StringHash>::Iterator i = dirtyReceivers_.Begin(); i != dirtyReceivers_.End(); ++i)
                 for (Set<StringHash>::Iterator i = dirtyReceivers_.Begin(); i != dirtyReceivers_.End(); ++i)
                 {
                 {
-                    Vector<Object*>& receivers = receivers_[*i];
-                    for (Vector<Object*>::Iterator j = receivers.Begin(); j != receivers.End();)
+                    PODVector<Object*>& receivers = receivers_[*i];
+                    for (PODVector<Object*>::Iterator j = receivers.Begin(); j != receivers.End();)
                     {
                     {
                         if (*j == 0)
                         if (*j == 0)
                             j = receivers.Erase(j);
                             j = receivers.Erase(j);
@@ -148,17 +148,17 @@ public:
     }
     }
     
     
     /// Return event receivers for a sender and event type, or null if they do not exist
     /// Return event receivers for a sender and event type, or null if they do not exist
-    Vector<Object*>* GetReceivers(Object* sender, StringHash eventType)
+    PODVector<Object*>* GetReceivers(Object* sender, StringHash eventType)
     {
     {
-        Map<Pair<Object*, StringHash>, Vector<Object*> >::Iterator i = 
+        Map<Pair<Object*, StringHash>, PODVector<Object*> >::Iterator i = 
             specificReceivers_.Find(MakePair(sender, eventType));
             specificReceivers_.Find(MakePair(sender, eventType));
         return (i != specificReceivers_.End()) ? &i->second_ : 0;
         return (i != specificReceivers_.End()) ? &i->second_ : 0;
     }
     }
     
     
     /// Return event receivers for an event type, or null if they do not exist
     /// Return event receivers for an event type, or null if they do not exist
-    Vector<Object*>* GetReceivers(StringHash eventType)
+    PODVector<Object*>* GetReceivers(StringHash eventType)
     {
     {
-        Map<StringHash, Vector<Object*> >::Iterator i = receivers_.Find(eventType);
+        Map<StringHash, PODVector<Object*> >::Iterator i = receivers_.Find(eventType);
         return (i != receivers_.End()) ? &i->second_ : 0;
         return (i != receivers_.End()) ? &i->second_ : 0;
     }
     }
     
     
@@ -170,11 +170,11 @@ private:
     /// Attribute descriptions per object type
     /// Attribute descriptions per object type
     Map<ShortStringHash, Vector<AttributeInfo> > attributes_;
     Map<ShortStringHash, Vector<AttributeInfo> > attributes_;
     /// Event receivers for non-specific events
     /// Event receivers for non-specific events
-    Map<StringHash, Vector<Object*> > receivers_;
+    Map<StringHash, PODVector<Object*> > receivers_;
     /// Event receivers for specific senders' events
     /// Event receivers for specific senders' events
-    Map<Pair<Object*, StringHash>, Vector<Object*> > specificReceivers_;
+    Map<Pair<Object*, StringHash>, PODVector<Object*> > specificReceivers_;
     /// Event sender stack
     /// Event sender stack
-    Vector<Object*> senders_;
+    PODVector<Object*> senders_;
     /// Event types that have had receivers removed during event handling
     /// Event types that have had receivers removed during event handling
     Set<StringHash> dirtyReceivers_;
     Set<StringHash> dirtyReceivers_;
     /// Event types for specific senders that have had receivers removed during event handling
     /// Event types for specific senders that have had receivers removed during event handling

+ 1 - 1
Engine/Core/Object.cpp

@@ -182,7 +182,7 @@ void Object::SendEvent(StringHash eventType, VariantMap& eventData)
     context_->BeginSendEvent(this);
     context_->BeginSendEvent(this);
     
     
     // Check first the specific event receivers
     // Check first the specific event receivers
-    const Vector<Object*>* group = context_->GetReceivers(this, eventType);
+    const PODVector<Object*>* group = context_->GetReceivers(this, eventType);
     if (group)
     if (group)
     {
     {
         unsigned numReceivers = group->Size();
         unsigned numReceivers = group->Size();

+ 0 - 1
Engine/Core/Precompiled.h

@@ -24,6 +24,5 @@
 #pragma once
 #pragma once
 
 
 #include "Map.h"
 #include "Map.h"
-#include "PODVector.h"
 #include "Set.h"
 #include "Set.h"
 #include "StringBase.h"
 #include "StringBase.h"

+ 2 - 2
Engine/Core/Profiler.cpp

@@ -165,8 +165,8 @@ void Profiler::GetData(ProfilerBlock* block, String& output, unsigned indent, bo
         }
         }
     }
     }
     
     
-    const Vector<ProfilerBlock*>& children = block->GetChildren();
-    for (Vector<ProfilerBlock*>::ConstIterator i = children.Begin(); i != children.End(); ++i)
+    const PODVector<ProfilerBlock*>& children = block->GetChildren();
+    for (PODVector<ProfilerBlock*>::ConstIterator i = children.Begin(); i != children.End(); ++i)
         GetData(*i, output, indent, showUnused, showAccumulated, showTotal);
         GetData(*i, output, indent, showUnused, showAccumulated, showTotal);
 }
 }
 
 

+ 6 - 6
Engine/Core/Profiler.h

@@ -49,7 +49,7 @@ public:
     /// Destruct. Free the child blocks
     /// Destruct. Free the child blocks
     ~ProfilerBlock()
     ~ProfilerBlock()
     {
     {
-        for (Vector<ProfilerBlock*>::Iterator i = children_.Begin(); i != children_.End(); ++i)
+        for (PODVector<ProfilerBlock*>::Iterator i = children_.Begin(); i != children_.End(); ++i)
         {
         {
             delete *i;
             delete *i;
             *i = 0;
             *i = 0;
@@ -81,7 +81,7 @@ public:
         time_ = 0;
         time_ = 0;
         count_ = 0;
         count_ = 0;
         
         
-        for (Vector<ProfilerBlock*>::Iterator i = children_.Begin(); i != children_.End(); ++i)
+        for (PODVector<ProfilerBlock*>::Iterator i = children_.Begin(); i != children_.End(); ++i)
             (*i)->EndFrame();
             (*i)->EndFrame();
     }
     }
     
     
@@ -91,7 +91,7 @@ public:
         accumulatedTime_ = 0;
         accumulatedTime_ = 0;
         accumulatedCount_ = 0;
         accumulatedCount_ = 0;
         
         
-        for (Vector<ProfilerBlock*>::Iterator i = children_.Begin(); i != children_.End(); ++i)
+        for (PODVector<ProfilerBlock*>::Iterator i = children_.Begin(); i != children_.End(); ++i)
             (*i)->ClearAccumulated();
             (*i)->ClearAccumulated();
     }
     }
     
     
@@ -103,7 +103,7 @@ public:
         
         
         lastSearchName_ = name;
         lastSearchName_ = name;
         
         
-        for (Vector<ProfilerBlock*>::Iterator i = children_.Begin(); i != children_.End(); ++i)
+        for (PODVector<ProfilerBlock*>::Iterator i = children_.Begin(); i != children_.End(); ++i)
         {
         {
             if ((*i)->name_ == name)
             if ((*i)->name_ == name)
             {
             {
@@ -137,7 +137,7 @@ public:
     /// Return parent block
     /// Return parent block
     ProfilerBlock* GetParent() const { return parent_; }
     ProfilerBlock* GetParent() const { return parent_; }
     /// Return child blocks
     /// Return child blocks
-    const Vector<ProfilerBlock*>& GetChildren() const { return children_; }
+    const PODVector<ProfilerBlock*>& GetChildren() const { return children_; }
     
     
 private:
 private:
     /// Block name
     /// Block name
@@ -156,7 +156,7 @@ private:
     /// Parent block
     /// Parent block
     ProfilerBlock* parent_;
     ProfilerBlock* parent_;
     /// Child blocks
     /// Child blocks
-    Vector<ProfilerBlock*> children_;
+    PODVector<ProfilerBlock*> children_;
     
     
     /// Time on the previous frame
     /// Time on the previous frame
     long long frameTime_;
     long long frameTime_;

+ 0 - 1
Engine/Core/Variant.h

@@ -25,7 +25,6 @@
 
 
 #include "Color.h"
 #include "Color.h"
 #include "Map.h"
 #include "Map.h"
-#include "PODVector.h"
 #include "Quaternion.h"
 #include "Quaternion.h"
 #include "StringHash.h"
 #include "StringHash.h"
 #include "Vector4.h"
 #include "Vector4.h"

+ 25 - 7
Engine/Engine/APITemplates.h

@@ -78,6 +78,24 @@ template <class T> CScriptArray* VectorToArray(const Vector<T>& vector, const ch
         return 0;
         return 0;
 }
 }
 
 
+/// Template function for PODVector to array conversion
+template <class T> CScriptArray* VectorToArray(const PODVector<T>& vector, const char* arrayName)
+{
+    asIScriptContext *context = asGetActiveContext();
+    if (context)
+    {
+        asIObjectType* type = GetScriptContext()->GetSubsystem<Script>()->GetObjectType(arrayName);
+        CScriptArray* arr = new CScriptArray(vector.Size(), type);
+        
+        for (unsigned i = 0; i < arr->GetSize(); ++i)
+            *(static_cast<T*>(arr->At(i))) = vector[i];
+        
+        return arr;
+    }
+    else
+        return 0;
+}
+
 /// Template function for Vector to handle array conversion
 /// Template function for Vector to handle array conversion
 template <class T> CScriptArray* VectorToHandleArray(const Vector<T*>& vector, const char* arrayName)
 template <class T> CScriptArray* VectorToHandleArray(const Vector<T*>& vector, const char* arrayName)
 {
 {
@@ -382,7 +400,7 @@ static Component* NodeGetComponentWithTypeAndIndex(const String& typeName, unsig
 
 
 static CScriptArray* NodeGetComponentsWithType(const String& typeName, Node* ptr)
 static CScriptArray* NodeGetComponentsWithType(const String& typeName, Node* ptr)
 {
 {
-    Vector<Component*> components;
+    PODVector<Component*> components;
     ptr->GetComponents(components, ShortStringHash(typeName));
     ptr->GetComponents(components, ShortStringHash(typeName));
     return VectorToHandleArray<Component>(components, "Array<Component@>");
     return VectorToHandleArray<Component>(components, "Array<Component@>");
 }
 }
@@ -394,14 +412,14 @@ static bool NodeHasComponent(const String& typeName, Node* ptr)
 
 
 static CScriptArray* NodeGetChildren(bool recursive, Node* ptr)
 static CScriptArray* NodeGetChildren(bool recursive, Node* ptr)
 {
 {
-    Vector<Node*> nodes;
+    PODVector<Node*> nodes;
     ptr->GetChildren(nodes, recursive);
     ptr->GetChildren(nodes, recursive);
     return VectorToHandleArray<Node>(nodes, "Array<Node@>");
     return VectorToHandleArray<Node>(nodes, "Array<Node@>");
 }
 }
 
 
 static CScriptArray* NodeGetChildrenWithComponent(String& typeName, bool recursive, Node* ptr)
 static CScriptArray* NodeGetChildrenWithComponent(String& typeName, bool recursive, Node* ptr)
 {
 {
-    Vector<Node*> nodes;
+    PODVector<Node*> nodes;
     ptr->GetChildrenWithComponent(nodes, ShortStringHash(typeName), recursive);
     ptr->GetChildrenWithComponent(nodes, ShortStringHash(typeName), recursive);
     return VectorToHandleArray<Node>(nodes, "Array<Node@>");
     return VectorToHandleArray<Node>(nodes, "Array<Node@>");
 }
 }
@@ -430,18 +448,18 @@ static Node* NodeGetChild(unsigned index, Node* ptr)
 
 
 static CScriptArray* NodeGetScriptedChildren(bool recursive, Node* ptr)
 static CScriptArray* NodeGetScriptedChildren(bool recursive, Node* ptr)
 {
 {
-    Vector<Node*> nodes;
+    PODVector<Node*> nodes;
     ptr->GetChildrenWithComponent<ScriptInstance>(nodes, recursive);
     ptr->GetChildrenWithComponent<ScriptInstance>(nodes, recursive);
     return VectorToHandleArray<Node>(nodes, "Array<Node@>");
     return VectorToHandleArray<Node>(nodes, "Array<Node@>");
 }
 }
 
 
 static CScriptArray* NodeGetScriptedChildrenWithClassName(const String& className, bool recursive, Node* ptr)
 static CScriptArray* NodeGetScriptedChildrenWithClassName(const String& className, bool recursive, Node* ptr)
 {
 {
-    Vector<Node*> nodes;
-    Vector<Node*> ret;
+    PODVector<Node*> nodes;
+    PODVector<Node*> ret;
     
     
     ptr->GetChildrenWithComponent<ScriptInstance>(nodes, recursive);
     ptr->GetChildrenWithComponent<ScriptInstance>(nodes, recursive);
-    for (Vector<Node*>::Iterator i = nodes.Begin(); i != nodes.End(); ++i)
+    for (PODVector<Node*>::Iterator i = nodes.Begin(); i != nodes.End(); ++i)
     {
     {
         Node* node = (*i);
         Node* node = (*i);
         const Vector<SharedPtr<Component> >& components = node->GetComponents();
         const Vector<SharedPtr<Component> >& components = node->GetComponents();

+ 1 - 1
Engine/Engine/GraphicsAPI.cpp

@@ -859,7 +859,7 @@ static Node* RayQueryResultGetNode(RayQueryResult* ptr)
 
 
 static CScriptArray* OctreeRaycast(const Ray& ray, unsigned char drawableFlags, float maxDistance, RayQueryLevel level, Octree* ptr)
 static CScriptArray* OctreeRaycast(const Ray& ray, unsigned char drawableFlags, float maxDistance, RayQueryLevel level, Octree* ptr)
 {
 {
-    Vector<RayQueryResult> result;
+    PODVector<RayQueryResult> result;
     RayOctreeQuery query(result, ray, drawableFlags, false, false, maxDistance, level);
     RayOctreeQuery query(result, ray, drawableFlags, false, false, maxDistance, level);
     ptr->GetDrawables(query);
     ptr->GetDrawables(query);
     return VectorToArray<RayQueryResult>(result, "Array<RayQueryResult>");
     return VectorToArray<RayQueryResult>(result, "Array<RayQueryResult>");

+ 1 - 1
Engine/Engine/PhysicsAPI.cpp

@@ -55,7 +55,7 @@ static Node* PhysicsRaycastResultGetNode(PhysicsRaycastResult* ptr)
 
 
 static CScriptArray* PhysicsWorldRaycast(const Ray& ray, float maxDistance, unsigned collisionMask, PhysicsWorld* ptr)
 static CScriptArray* PhysicsWorldRaycast(const Ray& ray, float maxDistance, unsigned collisionMask, PhysicsWorld* ptr)
 {
 {
-    static Vector<PhysicsRaycastResult> result;
+    static PODVector<PhysicsRaycastResult> result;
     ptr->Raycast(result, ray, maxDistance, collisionMask);
     ptr->Raycast(result, ray, maxDistance, collisionMask);
     return VectorToArray<PhysicsRaycastResult>(result, "Array<PhysicsRaycastResult>");
     return VectorToArray<PhysicsRaycastResult>(result, "Array<PhysicsRaycastResult>");
 }
 }

+ 0 - 1
Engine/Engine/Precompiled.h

@@ -24,5 +24,4 @@
 #pragma once
 #pragma once
 
 
 #include "Map.h"
 #include "Map.h"
-#include "PODVector.h"
 #include "StringBase.h"
 #include "StringBase.h"

+ 3 - 3
Engine/Engine/UIAPI.cpp

@@ -193,13 +193,13 @@ static CScriptArray* ListViewGetSelections(ListView* ptr)
 
 
 static CScriptArray* ListViewGetItems(ListView* ptr)
 static CScriptArray* ListViewGetItems(ListView* ptr)
 {
 {
-    Vector<UIElement*> result = ptr->GetItems();
+    PODVector<UIElement*> result = ptr->GetItems();
     return VectorToHandleArray<UIElement>(result, "Array<UIElement@>");
     return VectorToHandleArray<UIElement>(result, "Array<UIElement@>");
 }
 }
 
 
 static CScriptArray* ListViewGetSelectedItems(ListView* ptr)
 static CScriptArray* ListViewGetSelectedItems(ListView* ptr)
 {
 {
-    Vector<UIElement*> result = ptr->GetSelectedItems();
+    PODVector<UIElement*> result = ptr->GetSelectedItems();
     return VectorToHandleArray<UIElement>(result, "Array<UIElement@>");
     return VectorToHandleArray<UIElement>(result, "Array<UIElement@>");
 }
 }
 
 
@@ -325,7 +325,7 @@ static void RegisterMenu(asIScriptEngine* engine)
 
 
 static CScriptArray* DropDownListGetItems(DropDownList* ptr)
 static CScriptArray* DropDownListGetItems(DropDownList* ptr)
 {
 {
-    Vector<UIElement*> result = ptr->GetItems();
+    PODVector<UIElement*> result = ptr->GetItems();
     return VectorToHandleArray<UIElement>(result, "Array<UIElement@>");
     return VectorToHandleArray<UIElement>(result, "Array<UIElement@>");
 }
 }
 
 

+ 3 - 3
Engine/Graphics/AnimatedModel.cpp

@@ -381,7 +381,7 @@ void AnimatedModel::SetModel(Model* model, bool createBones)
         geometries_[i] = geometries[i];
         geometries_[i] = geometries[i];
     
     
     // Copy geometry bone mappings
     // Copy geometry bone mappings
-    const Vector<Vector<unsigned> >& geometryBoneMappings = model->GetGeometryBoneMappings();
+    const Vector<PODVector<unsigned> >& geometryBoneMappings = model->GetGeometryBoneMappings();
     geometryBoneMappings_.Clear();
     geometryBoneMappings_.Clear();
     for (unsigned i = 0; i < geometryBoneMappings.Size(); ++i)
     for (unsigned i = 0; i < geometryBoneMappings.Size(); ++i)
         geometryBoneMappings_.Push(geometryBoneMappings[i]);
         geometryBoneMappings_.Push(geometryBoneMappings[i]);
@@ -508,7 +508,7 @@ void AnimatedModel::SetMorphWeight(unsigned index, float weight)
         // For a master model, set the same morph weight on non-master models
         // For a master model, set the same morph weight on non-master models
         if (isMaster_)
         if (isMaster_)
         {
         {
-            Vector<AnimatedModel*> models;
+            PODVector<AnimatedModel*> models;
             GetComponents<AnimatedModel>(models);
             GetComponents<AnimatedModel>(models);
             
             
             // Indexing might not be the same, so use the name hash instead
             // Indexing might not be the same, so use the name hash instead
@@ -552,7 +552,7 @@ void AnimatedModel::ResetMorphWeights()
     // For a master model, reset weights on non-master models
     // For a master model, reset weights on non-master models
     if (isMaster_)
     if (isMaster_)
     {
     {
-        Vector<AnimatedModel*> models;
+        PODVector<AnimatedModel*> models;
         GetComponents<AnimatedModel>(models);
         GetComponents<AnimatedModel>(models);
         
         
         // Indexing might not be the same, so use the name hash instead
         // Indexing might not be the same, so use the name hash instead

+ 4 - 4
Engine/Graphics/AnimatedModel.h

@@ -169,13 +169,13 @@ private:
     /// Animation states
     /// Animation states
     Vector<SharedPtr<AnimationState> > animationStates_;
     Vector<SharedPtr<AnimationState> > animationStates_;
     /// Skinning matrices
     /// Skinning matrices
-    Vector<Matrix4x3> skinMatrices_;
+    PODVector<Matrix4x3> skinMatrices_;
     /// Mapping of subgeometry bone indices, used if more bones than skinning shader can manage
     /// Mapping of subgeometry bone indices, used if more bones than skinning shader can manage
-    Vector<Vector<unsigned> > geometryBoneMappings_;
+    Vector<PODVector<unsigned> > geometryBoneMappings_;
     /// Subgeometry skinning matrices, used if more bones than skinning shader can manage
     /// Subgeometry skinning matrices, used if more bones than skinning shader can manage
-    Vector<Vector<Matrix4x3> > geometrySkinMatrices_;
+    Vector<PODVector<Matrix4x3> > geometrySkinMatrices_;
     /// Subgeometry skinning matrix pointers, if more bones than skinning shader can manage
     /// Subgeometry skinning matrix pointers, if more bones than skinning shader can manage
-    Vector<Vector<Matrix4x3*> > geometrySkinMatrixPtrs_;
+    Vector<PODVector<Matrix4x3*> > geometrySkinMatrixPtrs_;
     /// The frame number animation LOD distance was last calculated on
     /// The frame number animation LOD distance was last calculated on
     unsigned animationLodFrameNumber_;
     unsigned animationLodFrameNumber_;
     /// Animation LOD bias
     /// Animation LOD bias

+ 1 - 1
Engine/Graphics/AnimationState.h

@@ -92,7 +92,7 @@ private:
     /// Mapping of animation track indices to bones
     /// Mapping of animation track indices to bones
     Map<unsigned, Bone*> trackToBoneMap_;
     Map<unsigned, Bone*> trackToBoneMap_;
     /// Last keyframe on each animation track for optimized keyframe search
     /// Last keyframe on each animation track for optimized keyframe search
-    Vector<unsigned> lastKeyFrame_;
+    PODVector<unsigned> lastKeyFrame_;
     /// Looped flag
     /// Looped flag
     bool looped_;
     bool looped_;
     /// Blending weight
     /// Blending weight

+ 1 - 1
Engine/Graphics/Batch.cpp

@@ -420,7 +420,7 @@ void BatchGroup::Draw(Graphics* graphics, VertexBuffer* buffer) const
         
         
         // Get the geometry vertex buffers, then add the instancing stream buffer
         // Get the geometry vertex buffers, then add the instancing stream buffer
         Vector<SharedPtr<VertexBuffer> > vertexBuffers = geometry_->GetVertexBuffers();
         Vector<SharedPtr<VertexBuffer> > vertexBuffers = geometry_->GetVertexBuffers();
-        Vector<unsigned> elementMasks = geometry_->GetVertexElementMasks();
+        PODVector<unsigned> elementMasks = geometry_->GetVertexElementMasks();
         vertexBuffers.Push(SharedPtr<VertexBuffer>(buffer));
         vertexBuffers.Push(SharedPtr<VertexBuffer>(buffer));
         elementMasks.Push(buffer->GetElementMask());
         elementMasks.Push(buffer->GetElementMask());
         
         

+ 0 - 1
Engine/Graphics/Batch.h

@@ -25,7 +25,6 @@
 
 
 #include "MathDefs.h"
 #include "MathDefs.h"
 #include "GraphicsDefs.h"
 #include "GraphicsDefs.h"
-#include "PODVector.h"
 #include "SharedPtr.h"
 #include "SharedPtr.h"
 
 
 class Camera;
 class Camera;

+ 2 - 2
Engine/Graphics/BillboardSet.cpp

@@ -111,7 +111,7 @@ void BillboardSet::OnSetAttribute(const AttributeInfo& attr, const Variant& valu
             MemoryBuffer buf(value.GetBuffer());
             MemoryBuffer buf(value.GetBuffer());
             unsigned numBillboards = buf.ReadVLE();
             unsigned numBillboards = buf.ReadVLE();
             SetNumBillboards(numBillboards);
             SetNumBillboards(numBillboards);
-            for (Vector<Billboard>::Iterator i = billboards_.Begin(); i != billboards_.End(); ++i)
+            for (PODVector<Billboard>::Iterator i = billboards_.Begin(); i != billboards_.End(); ++i)
             {
             {
                 i->position_ = buf.ReadVector3();
                 i->position_ = buf.ReadVector3();
                 i->size_ = buf.ReadVector2();
                 i->size_ = buf.ReadVector2();
@@ -141,7 +141,7 @@ Variant BillboardSet::OnGetAttribute(const AttributeInfo& attr)
         {
         {
             VectorBuffer buf;
             VectorBuffer buf;
             buf.WriteVLE(billboards_.Size());
             buf.WriteVLE(billboards_.Size());
-            for (Vector<Billboard>::ConstIterator i = billboards_.Begin(); i != billboards_.End(); ++i)
+            for (PODVector<Billboard>::ConstIterator i = billboards_.Begin(); i != billboards_.End(); ++i)
             {
             {
                 buf.WriteVector3(i->position_);
                 buf.WriteVector3(i->position_);
                 buf.WriteVector2(i->size_);
                 buf.WriteVector2(i->size_);

+ 2 - 2
Engine/Graphics/BillboardSet.h

@@ -96,7 +96,7 @@ public:
     /// Return number of billboards
     /// Return number of billboards
     unsigned GetNumBillboards() const { return billboards_.Size(); }
     unsigned GetNumBillboards() const { return billboards_.Size(); }
     /// Return all billboards
     /// Return all billboards
-    Vector<Billboard>& GetBillboards() { return billboards_; }
+    PODVector<Billboard>& GetBillboards() { return billboards_; }
     /// Return billboard by index
     /// Return billboard by index
     Billboard* GetBillboard(unsigned index);
     Billboard* GetBillboard(unsigned index);
     /// Return whether billboards are relative to the scene node
     /// Return whether billboards are relative to the scene node
@@ -117,7 +117,7 @@ protected:
     void MarkPositionsDirty();
     void MarkPositionsDirty();
     
     
     /// Billboards
     /// Billboards
-    Vector<Billboard> billboards_;
+    PODVector<Billboard> billboards_;
     /// Animation LOD bias
     /// Animation LOD bias
     float animationLodBias_;
     float animationLodBias_;
     /// Animation LOD timer
     /// Animation LOD timer

+ 4 - 4
Engine/Graphics/DebugRenderer.cpp

@@ -87,7 +87,7 @@ void DebugRenderer::AddBoundingBox(const BoundingBox& box, const Color& color, b
     
     
     unsigned d3dColor = color.ToUInt();
     unsigned d3dColor = color.ToUInt();
     
     
-    Vector<DebugLine>* dest = &lines_;
+    PODVector<DebugLine>* dest = &lines_;
     if (!depthTest)
     if (!depthTest)
         dest = &noDepthLines_;
         dest = &noDepthLines_;
     
     
@@ -121,7 +121,7 @@ void DebugRenderer::AddBoundingBox(const BoundingBox& box, const Matrix4x3& tran
     
     
     unsigned d3dColor = color.ToUInt();
     unsigned d3dColor = color.ToUInt();
     
     
-    Vector<DebugLine>* dest = &lines_;
+    PODVector<DebugLine>* dest = &lines_;
     if (!depthTest)
     if (!depthTest)
         dest = &noDepthLines_;
         dest = &noDepthLines_;
     
     
@@ -144,7 +144,7 @@ void DebugRenderer::AddFrustum(const Frustum& frustum, const Color& color, bool
     const Vector3* vertices = frustum.GetVertices();
     const Vector3* vertices = frustum.GetVertices();
     unsigned d3dColor = color.ToUInt();
     unsigned d3dColor = color.ToUInt();
     
     
-    Vector<DebugLine>* dest = &lines_;
+    PODVector<DebugLine>* dest = &lines_;
     if (!depthTest)
     if (!depthTest)
         dest = &noDepthLines_;
         dest = &noDepthLines_;
     
     
@@ -171,7 +171,7 @@ void DebugRenderer::AddSkeleton(const Skeleton& skeleton, const Color& color, bo
     DebugLine newLine;
     DebugLine newLine;
     newLine.color_ = color.ToUInt();
     newLine.color_ = color.ToUInt();
     
     
-    Vector<DebugLine>* dest = &lines_;
+    PODVector<DebugLine>* dest = &lines_;
     if (!depthTest)
     if (!depthTest)
         dest = &noDepthLines_;
         dest = &noDepthLines_;
     
     

+ 2 - 2
Engine/Graphics/DebugRenderer.h

@@ -103,9 +103,9 @@ private:
     void HandleEndFrame(StringHash eventType, VariantMap& eventData);
     void HandleEndFrame(StringHash eventType, VariantMap& eventData);
     
     
     /// Lines rendered with depth test
     /// Lines rendered with depth test
-    Vector<DebugLine> lines_;
+    PODVector<DebugLine> lines_;
     /// Lines rendered without depth test
     /// Lines rendered without depth test
-    Vector<DebugLine> noDepthLines_;
+    PODVector<DebugLine> noDepthLines_;
     /// View transform
     /// View transform
     Matrix4x3 view_;
     Matrix4x3 view_;
     /// Projection transform
     /// Projection transform

+ 2 - 2
Engine/Graphics/Geometry.h

@@ -60,7 +60,7 @@ public:
     /// Return all vertex buffers
     /// Return all vertex buffers
     const Vector<SharedPtr<VertexBuffer> >& GetVertexBuffers() const { return vertexBuffer_; }
     const Vector<SharedPtr<VertexBuffer> >& GetVertexBuffers() const { return vertexBuffer_; }
     /// Return vertex element masks
     /// Return vertex element masks
-    const Vector<unsigned>& GetVertexElementMasks() const { return elementMasks_; }
+    const PODVector<unsigned>& GetVertexElementMasks() const { return elementMasks_; }
     /// Return number of vertex buffers
     /// Return number of vertex buffers
     unsigned GetNumVertexBuffers() const { return vertexBuffer_.Size(); }
     unsigned GetNumVertexBuffers() const { return vertexBuffer_.Size(); }
     /// Return vertex buffer by index
     /// Return vertex buffer by index
@@ -97,7 +97,7 @@ private:
     /// Vertex buffers
     /// Vertex buffers
     Vector<SharedPtr<VertexBuffer> > vertexBuffer_;
     Vector<SharedPtr<VertexBuffer> > vertexBuffer_;
     /// Vertex element masks
     /// Vertex element masks
-    Vector<unsigned> elementMasks_;
+    PODVector<unsigned> elementMasks_;
     /// Index buffer
     /// Index buffer
     SharedPtr<IndexBuffer> indexBuffer_;
     SharedPtr<IndexBuffer> indexBuffer_;
     /// Primitive type
     /// Primitive type

+ 8 - 8
Engine/Graphics/Graphics.cpp

@@ -306,7 +306,7 @@ bool Graphics::SetMode(RenderMode mode, int width, int height, bool fullscreen,
     // Check fullscreen mode validity. If not valid, revert to windowed
     // Check fullscreen mode validity. If not valid, revert to windowed
     if (fullscreen)
     if (fullscreen)
     {
     {
-        Vector<IntVector2> resolutions = GetResolutions();
+        PODVector<IntVector2> resolutions = GetResolutions();
         fullscreen = false;
         fullscreen = false;
         for (unsigned i = 0; i < resolutions.Size(); ++i)
         for (unsigned i = 0; i < resolutions.Size(); ++i)
         {
         {
@@ -740,13 +740,13 @@ void Graphics::DrawInstanced(PrimitiveType type, unsigned indexStart, unsigned i
 void Graphics::SetVertexBuffer(VertexBuffer* buffer)
 void Graphics::SetVertexBuffer(VertexBuffer* buffer)
 {
 {
     Vector<VertexBuffer*> vertexBuffers(1);
     Vector<VertexBuffer*> vertexBuffers(1);
-    Vector<unsigned> elementMasks(1);
+    PODVector<unsigned> elementMasks(1);
     vertexBuffers[0] = buffer;
     vertexBuffers[0] = buffer;
     elementMasks[0] = MASK_DEFAULT;
     elementMasks[0] = MASK_DEFAULT;
     SetVertexBuffers(vertexBuffers, elementMasks);
     SetVertexBuffers(vertexBuffers, elementMasks);
 }
 }
 
 
-bool Graphics::SetVertexBuffers(const Vector<VertexBuffer*>& buffers, const Vector<unsigned>& elementMasks,
+bool Graphics::SetVertexBuffers(const Vector<VertexBuffer*>& buffers, const PODVector<unsigned>& elementMasks,
     unsigned instanceOffset)
     unsigned instanceOffset)
 {
 {
     if (buffers.Size() > MAX_VERTEX_STREAMS)
     if (buffers.Size() > MAX_VERTEX_STREAMS)
@@ -820,7 +820,7 @@ bool Graphics::SetVertexBuffers(const Vector<VertexBuffer*>& buffers, const Vect
     return true;
     return true;
 }
 }
 
 
-bool Graphics::SetVertexBuffers(const Vector<SharedPtr<VertexBuffer> >& buffers, const Vector<unsigned>&
+bool Graphics::SetVertexBuffers(const Vector<SharedPtr<VertexBuffer> >& buffers, const PODVector<unsigned>&
     elementMasks, unsigned instanceOffset)
     elementMasks, unsigned instanceOffset)
 {
 {
    if (buffers.Size() > MAX_VERTEX_STREAMS)
    if (buffers.Size() > MAX_VERTEX_STREAMS)
@@ -1895,9 +1895,9 @@ unsigned Graphics::GetWindowHandle() const
     return (unsigned)impl_->window_;
     return (unsigned)impl_->window_;
 }
 }
 
 
-Vector<IntVector2> Graphics::GetResolutions() const
+PODVector<IntVector2> Graphics::GetResolutions() const
 {
 {
-    Vector<IntVector2> ret;
+    PODVector<IntVector2> ret;
     if (!impl_->interface_)
     if (!impl_->interface_)
         return ret;
         return ret;
     
     
@@ -1930,9 +1930,9 @@ Vector<IntVector2> Graphics::GetResolutions() const
     return ret;
     return ret;
 }
 }
 
 
-Vector<int> Graphics::GetMultiSampleLevels() const
+PODVector<int> Graphics::GetMultiSampleLevels() const
 {
 {
-    Vector<int> ret;
+    PODVector<int> ret;
     // No multisampling always supported
     // No multisampling always supported
     ret.Push(0);
     ret.Push(0);
     
     

+ 4 - 4
Engine/Graphics/Graphics.h

@@ -94,9 +94,9 @@ public:
     /// Set vertex buffer
     /// Set vertex buffer
     void SetVertexBuffer(VertexBuffer* buffer);
     void SetVertexBuffer(VertexBuffer* buffer);
     /// Set multiple vertex buffers
     /// Set multiple vertex buffers
-    bool SetVertexBuffers(const Vector<VertexBuffer*>& buffers, const Vector<unsigned>& elementMasks, unsigned instanceOffset = 0);
+    bool SetVertexBuffers(const Vector<VertexBuffer*>& buffers, const PODVector<unsigned>& elementMasks, unsigned instanceOffset = 0);
     /// Set multiple vertex buffers
     /// Set multiple vertex buffers
-    bool SetVertexBuffers(const Vector<SharedPtr<VertexBuffer> >& buffers, const Vector<unsigned>& elementMasks, unsigned instanceOffset = 0);
+    bool SetVertexBuffers(const Vector<SharedPtr<VertexBuffer> >& buffers, const PODVector<unsigned>& elementMasks, unsigned instanceOffset = 0);
     /// Set index buffer
     /// Set index buffer
     void SetIndexBuffer(IndexBuffer* buffer);
     void SetIndexBuffer(IndexBuffer* buffer);
     /// Set shaders
     /// Set shaders
@@ -269,9 +269,9 @@ public:
     /// Return whether stream offset is supported
     /// Return whether stream offset is supported
     bool GetStreamOffsetSupport() const { return streamOffsetSupport_; }
     bool GetStreamOffsetSupport() const { return streamOffsetSupport_; }
     /// Return supported fullscreen resolutions
     /// Return supported fullscreen resolutions
-    Vector<IntVector2> GetResolutions() const;
+    PODVector<IntVector2> GetResolutions() const;
     /// Return supported multisampling levels
     /// Return supported multisampling levels
-    Vector<int> GetMultiSampleLevels() const;
+    PODVector<int> GetMultiSampleLevels() const;
     /// Return vertex buffer by index
     /// Return vertex buffer by index
     VertexBuffer* GetVertexBuffer(unsigned index) const;
     VertexBuffer* GetVertexBuffer(unsigned index) const;
     /// Return index buffer
     /// Return index buffer

+ 2 - 2
Engine/Graphics/Model.cpp

@@ -145,7 +145,7 @@ bool Model::Load(Deserializer& source)
     {
     {
         // Read bone mappings
         // Read bone mappings
         unsigned boneMappingCount = source.ReadUInt();
         unsigned boneMappingCount = source.ReadUInt();
-        Vector<unsigned> boneMapping;
+        PODVector<unsigned> boneMapping;
         for (unsigned j = 0; j < boneMappingCount; ++j)
         for (unsigned j = 0; j < boneMappingCount; ++j)
             boneMapping.Push(source.ReadUInt());
             boneMapping.Push(source.ReadUInt());
         geometryBoneMappings_.Push(boneMapping);
         geometryBoneMappings_.Push(boneMapping);
@@ -392,7 +392,7 @@ void Model::SetSkeleton(const Skeleton& skeleton)
     skeleton_ = skeleton;
     skeleton_ = skeleton;
 }
 }
 
 
-void Model::SetGeometryBoneMappings(const Vector<Vector<unsigned> >& geometryBoneMappings)
+void Model::SetGeometryBoneMappings(const Vector<PODVector<unsigned> >& geometryBoneMappings)
 {
 {
     geometryBoneMappings_ = geometryBoneMappings;
     geometryBoneMappings_ = geometryBoneMappings;
 }
 }

+ 3 - 3
Engine/Graphics/Model.h

@@ -87,7 +87,7 @@ public:
     /// Set skeleton
     /// Set skeleton
     void SetSkeleton(const Skeleton& skeleton);
     void SetSkeleton(const Skeleton& skeleton);
     /// Set bone mappings when model has more bones than the skinning shader can handle
     /// Set bone mappings when model has more bones than the skinning shader can handle
-    void SetGeometryBoneMappings(const Vector<Vector<unsigned> >& mappings);
+    void SetGeometryBoneMappings(const Vector<PODVector<unsigned> >& mappings);
     /// Set vertex morphs
     /// Set vertex morphs
     void SetMorphs(const Vector<ModelMorph>& morphs);
     void SetMorphs(const Vector<ModelMorph>& morphs);
     
     
@@ -108,7 +108,7 @@ public:
     /// Return geometry by index and LOD level
     /// Return geometry by index and LOD level
     Geometry* GetGeometry(unsigned index, unsigned lodLevel) const;
     Geometry* GetGeometry(unsigned index, unsigned lodLevel) const;
     /// Return geometery bone mappings
     /// Return geometery bone mappings
-    const Vector<Vector<unsigned> >& GetGeometryBoneMappings() const { return geometryBoneMappings_; }
+    const Vector<PODVector<unsigned> >& GetGeometryBoneMappings() const { return geometryBoneMappings_; }
     /// Return vertex morphs
     /// Return vertex morphs
     const Vector<ModelMorph>& GetMorphs() const { return morphs_; }
     const Vector<ModelMorph>& GetMorphs() const { return morphs_; }
     /// Return number of vertex morphs
     /// Return number of vertex morphs
@@ -132,7 +132,7 @@ private:
     /// Geometry pointers
     /// Geometry pointers
     Vector<Vector<SharedPtr<Geometry> > > geometries_;
     Vector<Vector<SharedPtr<Geometry> > > geometries_;
     /// Geometry bone mappings
     /// Geometry bone mappings
-    Vector<Vector<unsigned> > geometryBoneMappings_;
+    Vector<PODVector<unsigned> > geometryBoneMappings_;
     /// Vertex morphs
     /// Vertex morphs
     Vector<ModelMorph> morphs_;
     Vector<ModelMorph> morphs_;
 };
 };

+ 2 - 3
Engine/Graphics/OctreeQuery.h

@@ -25,7 +25,6 @@
 
 
 #include "BoundingBox.h"
 #include "BoundingBox.h"
 #include "Frustum.h"
 #include "Frustum.h"
-#include "PODVector.h"
 #include "Ray.h"
 #include "Ray.h"
 #include "Sphere.h"
 #include "Sphere.h"
 
 
@@ -207,7 +206,7 @@ class RayOctreeQuery
 {
 {
 public:
 public:
     /// Construct with ray and query parameters
     /// Construct with ray and query parameters
-    RayOctreeQuery(Vector<RayQueryResult>& result, const Ray& ray, unsigned char drawableFlags, bool occludersOnly = false,
+    RayOctreeQuery(PODVector<RayQueryResult>& result, const Ray& ray, unsigned char drawableFlags, bool occludersOnly = false,
         bool shadowCastersOnly = false, float maxDistance = M_INFINITY, RayQueryLevel level = RAY_TRIANGLE) :
         bool shadowCastersOnly = false, float maxDistance = M_INFINITY, RayQueryLevel level = RAY_TRIANGLE) :
         ray_(ray),
         ray_(ray),
         result_(result),
         result_(result),
@@ -222,7 +221,7 @@ public:
     /// Ray
     /// Ray
     Ray ray_;
     Ray ray_;
     /// Result vector reference
     /// Result vector reference
-    Vector<RayQueryResult>& result_;
+    PODVector<RayQueryResult>& result_;
     /// Drawable flags to include
     /// Drawable flags to include
     unsigned char drawableFlags_;
     unsigned char drawableFlags_;
     /// Get occluders only flag
     /// Get occluders only flag

+ 2 - 2
Engine/Graphics/ParticleEmitter.cpp

@@ -105,7 +105,7 @@ void ParticleEmitter::OnSetAttribute(const AttributeInfo& attr, const Variant& v
         {
         {
             MemoryBuffer buf(value.GetBuffer());
             MemoryBuffer buf(value.GetBuffer());
             SetNumParticles(buf.ReadVLE());
             SetNumParticles(buf.ReadVLE());
-            for (Vector<Particle>::Iterator i = particles_.Begin(); i != particles_.End(); ++i)
+            for (PODVector<Particle>::Iterator i = particles_.Begin(); i != particles_.End(); ++i)
             {
             {
                 i->velocity_ = buf.ReadVector3();
                 i->velocity_ = buf.ReadVector3();
                 i->size_ = buf.ReadVector2();
                 i->size_ = buf.ReadVector2();
@@ -136,7 +136,7 @@ Variant ParticleEmitter::OnGetAttribute(const AttributeInfo& attr)
         {
         {
             VectorBuffer buf;
             VectorBuffer buf;
             buf.WriteVLE(particles_.Size());
             buf.WriteVLE(particles_.Size());
-            for (Vector<Particle>::ConstIterator i = particles_.Begin(); i != particles_.End(); ++i)
+            for (PODVector<Particle>::ConstIterator i = particles_.Begin(); i != particles_.End(); ++i)
             {
             {
                 buf.WriteVector3(i->velocity_);
                 buf.WriteVector3(i->velocity_);
                 buf.WriteVector2(i->size_);
                 buf.WriteVector2(i->size_);

+ 1 - 1
Engine/Graphics/ParticleEmitter.h

@@ -125,7 +125,7 @@ private:
     /// Parameter XML file
     /// Parameter XML file
     SharedPtr<XMLFile> parameterSource_;
     SharedPtr<XMLFile> parameterSource_;
     /// Particles
     /// Particles
-    Vector<Particle> particles_;
+    PODVector<Particle> particles_;
     /// Color fade range
     /// Color fade range
     Vector<ColorFade> colors_;
     Vector<ColorFade> colors_;
     /// Texture animation
     /// Texture animation

+ 0 - 1
Engine/Graphics/Precompiled.h

@@ -24,7 +24,6 @@
 #pragma once
 #pragma once
 
 
 #include "Map.h"
 #include "Map.h"
-#include "PODVector.h"
 #include "Set.h"
 #include "Set.h"
 #include "Sort.h"
 #include "Sort.h"
 #include "StringBase.h"
 #include "StringBase.h"

+ 2 - 2
Engine/Graphics/Renderer.cpp

@@ -1132,7 +1132,7 @@ void Renderer::LoadPassShaders(Technique* technique, PassType pass, bool allowSh
 
 
 void Renderer::ReleaseMaterialShaders()
 void Renderer::ReleaseMaterialShaders()
 {
 {
-    Vector<Material*> materials;
+    PODVector<Material*> materials;
     cache_->GetResources<Material>(materials);
     cache_->GetResources<Material>(materials);
     
     
     for (unsigned i = 0; i < materials.Size(); ++i)
     for (unsigned i = 0; i < materials.Size(); ++i)
@@ -1144,7 +1144,7 @@ void Renderer::ReleaseMaterialShaders()
 
 
 void Renderer::ReloadTextures()
 void Renderer::ReloadTextures()
 {
 {
-    Vector<Resource*> textures;
+    PODVector<Resource*> textures;
     
     
     cache_->GetResources(textures, Texture2D::GetTypeStatic());
     cache_->GetResources(textures, Texture2D::GetTypeStatic());
     for (unsigned i = 0; i < textures.Size(); ++i)
     for (unsigned i = 0; i < textures.Size(); ++i)

+ 1 - 1
Engine/Graphics/StaticModel.h

@@ -96,7 +96,7 @@ protected:
     /// Geometries
     /// Geometries
     Vector<Vector<SharedPtr<Geometry> > > geometries_;
     Vector<Vector<SharedPtr<Geometry> > > geometries_;
     /// LOD levels
     /// LOD levels
-    Vector<unsigned> lodLevels_;
+    PODVector<unsigned> lodLevels_;
     /// Materials
     /// Materials
     Vector<SharedPtr<Material> > materials_;
     Vector<SharedPtr<Material> > materials_;
     /// Software LOD level, used in raycast and occlusion
     /// Software LOD level, used in raycast and occlusion

+ 2 - 2
Engine/Graphics/VertexDeclaration.cpp

@@ -105,7 +105,7 @@ VertexDeclaration::VertexDeclaration(Graphics* graphics, unsigned elementMask) :
     Create(graphics, elements);
     Create(graphics, elements);
 }
 }
 
 
-VertexDeclaration::VertexDeclaration(Graphics* graphics, const Vector<VertexBuffer*>& buffers, const Vector<unsigned>& elementMasks) :
+VertexDeclaration::VertexDeclaration(Graphics* graphics, const Vector<VertexBuffer*>& buffers, const PODVector<unsigned>& elementMasks) :
     declaration_(0)
     declaration_(0)
 {
 {
     unsigned usedElementMask = 0;
     unsigned usedElementMask = 0;
@@ -146,7 +146,7 @@ VertexDeclaration::VertexDeclaration(Graphics* graphics, const Vector<VertexBuff
     Create(graphics, elements);
     Create(graphics, elements);
 }
 }
 
 
-VertexDeclaration::VertexDeclaration(Graphics* graphics, const Vector<SharedPtr<VertexBuffer> >& buffers, const Vector<unsigned>& elementMasks) :
+VertexDeclaration::VertexDeclaration(Graphics* graphics, const Vector<SharedPtr<VertexBuffer> >& buffers, const PODVector<unsigned>& elementMasks) :
     declaration_(0)
     declaration_(0)
 {
 {
     unsigned usedElementMask = 0;
     unsigned usedElementMask = 0;

+ 2 - 3
Engine/Graphics/VertexDeclaration.h

@@ -24,7 +24,6 @@
 #pragma once
 #pragma once
 
 
 #include "GraphicsDefs.h"
 #include "GraphicsDefs.h"
-#include "PODVector.h"
 #include "RefCounted.h"
 #include "RefCounted.h"
 #include "Vector.h"
 #include "Vector.h"
 
 
@@ -51,9 +50,9 @@ public:
     /// Construct with graphics subsystem pointer and vertex element mask
     /// Construct with graphics subsystem pointer and vertex element mask
     VertexDeclaration(Graphics* graphics, unsigned elementMask);
     VertexDeclaration(Graphics* graphics, unsigned elementMask);
     /// Construct with graphics subsystem pointer and vertex buffers to base declaration on
     /// Construct with graphics subsystem pointer and vertex buffers to base declaration on
-    VertexDeclaration(Graphics* graphics, const Vector<VertexBuffer*>& buffers, const Vector<unsigned>& elementMasks);
+    VertexDeclaration(Graphics* graphics, const Vector<VertexBuffer*>& buffers, const PODVector<unsigned>& elementMasks);
     /// Construct with graphics subsystem pointer and vertex buffers to base declaration on
     /// Construct with graphics subsystem pointer and vertex buffers to base declaration on
-    VertexDeclaration(Graphics* graphics, const Vector<SharedPtr<VertexBuffer> >& buffers, const Vector<unsigned>& elementMasks);
+    VertexDeclaration(Graphics* graphics, const Vector<SharedPtr<VertexBuffer> >& buffers, const PODVector<unsigned>& elementMasks);
     /// Destruct
     /// Destruct
     ~VertexDeclaration();
     ~VertexDeclaration();
     
     

+ 1 - 1
Engine/IO/FileSystem.cpp

@@ -103,7 +103,7 @@ int FileSystem::SystemRun(const String& fileName, const Vector<String>& argument
     {
     {
         String fixedFileName = GetNativePath(fileName, true);
         String fixedFileName = GetNativePath(fileName, true);
         
         
-        Vector<const char*> argPtrs;
+        PODVector<const char*> argPtrs;
         argPtrs.Push(fixedFileName.CString());
         argPtrs.Push(fixedFileName.CString());
         for (unsigned i = 0; i < arguments.Size(); ++i)
         for (unsigned i = 0; i < arguments.Size(); ++i)
             argPtrs.Push(arguments[i].CString());
             argPtrs.Push(arguments[i].CString());

+ 0 - 1
Engine/IO/Precompiled.h

@@ -24,6 +24,5 @@
 #pragma once
 #pragma once
 
 
 #include "Map.h"
 #include "Map.h"
-#include "PODVector.h"
 #include "Set.h"
 #include "Set.h"
 #include "StringBase.h"
 #include "StringBase.h"

+ 0 - 1
Engine/IO/Serializer.h

@@ -24,7 +24,6 @@
 #pragma once
 #pragma once
 
 
 #include "Map.h"
 #include "Map.h"
-#include "PODVector.h"
 #include "StringHash.h"
 #include "StringHash.h"
 
 
 class Color;
 class Color;

+ 0 - 1
Engine/Network/Precompiled.h

@@ -24,7 +24,6 @@
 #pragma once
 #pragma once
 
 
 #include "Map.h"
 #include "Map.h"
-#include "PODVector.h"
 #include "Set.h"
 #include "Set.h"
 #include "StringBase.h"
 #include "StringBase.h"
 
 

+ 8 - 8
Engine/Physics/PhysicsWorld.cpp

@@ -176,7 +176,7 @@ void PhysicsWorld::Update(float timeStep)
             SendEvent(E_PHYSICSPRESTEP, eventData);
             SendEvent(E_PHYSICSPRESTEP, eventData);
             
             
             // Store the previous transforms of the physics objects
             // Store the previous transforms of the physics objects
-            for (Vector<RigidBody*>::Iterator i = rigidBodies_.Begin(); i != rigidBodies_.End(); ++i)
+            for (PODVector<RigidBody*>::Iterator i = rigidBodies_.Begin(); i != rigidBodies_.End(); ++i)
                 (*i)->PreStep();
                 (*i)->PreStep();
             
             
             /// \todo ODE random number generation is not threadsafe
             /// \todo ODE random number generation is not threadsafe
@@ -202,7 +202,7 @@ void PhysicsWorld::Update(float timeStep)
             
             
             // Interpolate transforms of physics objects
             // Interpolate transforms of physics objects
             float t = Clamp(timeAcc_ / internalTimeStep, 0.0f, 1.0f);
             float t = Clamp(timeAcc_ / internalTimeStep, 0.0f, 1.0f);
-            for (Vector<RigidBody*>::Iterator i = rigidBodies_.Begin(); i != rigidBodies_.End(); ++i)
+            for (PODVector<RigidBody*>::Iterator i = rigidBodies_.Begin(); i != rigidBodies_.End(); ++i)
                 (*i)->PostStep(t);
                 (*i)->PostStep(t);
             
             
             // Send post-step event
             // Send post-step event
@@ -283,7 +283,7 @@ void PhysicsWorld::SetTimeAccumulator(float time)
     timeAcc_ = time;
     timeAcc_ = time;
 }
 }
 
 
-void PhysicsWorld::Raycast(Vector<PhysicsRaycastResult>& result, const Ray& ray, float maxDistance, unsigned collisionMask)
+void PhysicsWorld::Raycast(PODVector<PhysicsRaycastResult>& result, const Ray& ray, float maxDistance, unsigned collisionMask)
 {
 {
     PROFILE(PhysicsRaycast);
     PROFILE(PhysicsRaycast);
     
     
@@ -355,7 +355,7 @@ void PhysicsWorld::AddRigidBody(RigidBody* body)
 
 
 void PhysicsWorld::RemoveRigidBody(RigidBody* body)
 void PhysicsWorld::RemoveRigidBody(RigidBody* body)
 {
 {
-    for (Vector<RigidBody*>::Iterator i = rigidBodies_.Begin(); i != rigidBodies_.End(); ++i)
+    for (PODVector<RigidBody*>::Iterator i = rigidBodies_.Begin(); i != rigidBodies_.End(); ++i)
     {
     {
         if ((*i) == body)
         if ((*i) == body)
         {
         {
@@ -444,11 +444,11 @@ void PhysicsWorld::DrawDebugGeometry(bool depthTest)
         return;
         return;
     
     
     // Get all geometries, also those that have no rigid bodies
     // Get all geometries, also those that have no rigid bodies
-    Vector<Node*> nodes;
-    Vector<CollisionShape*> shapes;
+    PODVector<Node*> nodes;
+    PODVector<CollisionShape*> shapes;
     node_->GetChildrenWithComponent<CollisionShape>(nodes, true);
     node_->GetChildrenWithComponent<CollisionShape>(nodes, true);
     
     
-    for (Vector<Node*>::Iterator i = nodes.Begin(); i != nodes.End(); ++i)
+    for (PODVector<Node*>::Iterator i = nodes.Begin(); i != nodes.End(); ++i)
     {
     {
         (*i)->GetComponents<CollisionShape>(shapes);
         (*i)->GetComponents<CollisionShape>(shapes);
         for (Vector<CollisionShape*>::Iterator j = shapes.Begin(); j != shapes.End(); ++j)
         for (Vector<CollisionShape*>::Iterator j = shapes.Begin(); j != shapes.End(); ++j)
@@ -607,7 +607,7 @@ void PhysicsWorld::RaycastCallback(void *userData, dGeomID geomA, dGeomID geomB)
     
     
     if (numContacts > 0)
     if (numContacts > 0)
     {
     {
-        Vector<PhysicsRaycastResult>* result = static_cast<Vector<PhysicsRaycastResult>*>(userData);
+        PODVector<PhysicsRaycastResult>* result = static_cast<PODVector<PhysicsRaycastResult>*>(userData);
         PhysicsRaycastResult newResult;
         PhysicsRaycastResult newResult;
         
         
         CollisionShape* shapeA = static_cast<CollisionShape*>(dGeomGetData(geomA));
         CollisionShape* shapeA = static_cast<CollisionShape*>(dGeomGetData(geomA));

+ 3 - 3
Engine/Physics/PhysicsWorld.h

@@ -81,7 +81,7 @@ struct PhysicsCollisionInfo
     /// New collision flag
     /// New collision flag
     bool newCollision_;
     bool newCollision_;
     /// Contacts
     /// Contacts
-    Vector<PhysicsContactInfo> contacts_;
+    PODVector<PhysicsContactInfo> contacts_;
 };
 };
 
 
 static const float PHYSICS_MIN_TIMESTEP = 0.001f;
 static const float PHYSICS_MIN_TIMESTEP = 0.001f;
@@ -130,7 +130,7 @@ public:
     /// Set simulation step time accumulator
     /// Set simulation step time accumulator
     void SetTimeAccumulator(float time);
     void SetTimeAccumulator(float time);
     /// Perform a physics world raycast
     /// Perform a physics world raycast
-    void Raycast(Vector<PhysicsRaycastResult>& result, const Ray& ray, float maxDistance, unsigned collisionMask =
+    void Raycast(PODVector<PhysicsRaycastResult>& result, const Ray& ray, float maxDistance, unsigned collisionMask =
         M_MAX_UNSIGNED);
         M_MAX_UNSIGNED);
     
     
     /// Return ODE world ID
     /// Return ODE world ID
@@ -213,7 +213,7 @@ private:
     /// Simulation random seed
     /// Simulation random seed
     unsigned randomSeed_;
     unsigned randomSeed_;
     /// Rigid bodies
     /// Rigid bodies
-    Vector<RigidBody*> rigidBodies_;
+    PODVector<RigidBody*> rigidBodies_;
     /// Collision contacts (PODVector<dContact>)
     /// Collision contacts (PODVector<dContact>)
     void* contacts_;
     void* contacts_;
     /// Collision pairs on this frame
     /// Collision pairs on this frame

+ 0 - 1
Engine/Physics/Precompiled.h

@@ -24,7 +24,6 @@
 #pragma once
 #pragma once
 
 
 #include "Map.h"
 #include "Map.h"
-#include "PODVector.h"
 #include "StringBase.h"
 #include "StringBase.h"
 
 
 #include <cstdio>
 #include <cstdio>

+ 3 - 3
Engine/Physics/RigidBody.cpp

@@ -429,7 +429,7 @@ void RigidBody::CreateBody()
         previousRotation_ = rotation;
         previousRotation_ = rotation;
         
         
         // Associate geometries with the body
         // Associate geometries with the body
-        Vector<CollisionShape*> shapes;
+        PODVector<CollisionShape*> shapes;
         GetComponents<CollisionShape>(shapes);
         GetComponents<CollisionShape>(shapes);
         for (unsigned i = 0; i < shapes.Size(); ++i)
         for (unsigned i = 0; i < shapes.Size(); ++i)
             shapes[i]->UpdateTransform();
             shapes[i]->UpdateTransform();
@@ -443,7 +443,7 @@ void RigidBody::ReleaseBody()
     if (!body_)
     if (!body_)
         return;
         return;
     
     
-    Vector<CollisionShape*> shapes;
+    PODVector<CollisionShape*> shapes;
     GetComponents<CollisionShape>(shapes);
     GetComponents<CollisionShape>(shapes);
     
     
     // First remove rigid body associations
     // First remove rigid body associations
@@ -473,7 +473,7 @@ void RigidBody::UpdateMass()
     float density = 1.0f;
     float density = 1.0f;
     
     
     // Get all attached collision shapes to calculate the mass
     // Get all attached collision shapes to calculate the mass
-    Vector<CollisionShape*> shapes;
+    PODVector<CollisionShape*> shapes;
     GetComponents<CollisionShape>(shapes);
     GetComponents<CollisionShape>(shapes);
     
     
     for (unsigned i = 0; i < shapes.Size(); ++i)
     for (unsigned i = 0; i < shapes.Size(); ++i)

+ 0 - 1
Engine/Resource/Precompiled.h

@@ -24,6 +24,5 @@
 #pragma once
 #pragma once
 
 
 #include "Map.h"
 #include "Map.h"
-#include "PODVector.h"
 #include "Set.h"
 #include "Set.h"
 #include "StringBase.h"
 #include "StringBase.h"

+ 1 - 1
Engine/Resource/ResourceCache.cpp

@@ -389,7 +389,7 @@ Resource* ResourceCache::GetResource(ShortStringHash type, StringHash nameHash)
     return resource;
     return resource;
 }
 }
 
 
-void ResourceCache::GetResources(Vector<Resource*>& result, ShortStringHash type) const
+void ResourceCache::GetResources(PODVector<Resource*>& result, ShortStringHash type) const
 {
 {
     result.Clear();
     result.Clear();
     Map<ShortStringHash, ResourceGroup>::ConstIterator i = resourceGroups_.Find(type);
     Map<ShortStringHash, ResourceGroup>::ConstIterator i = resourceGroups_.Find(type);

+ 4 - 4
Engine/Resource/ResourceCache.h

@@ -91,7 +91,7 @@ public:
     /// Return a resource by type and name hash. Load if not loaded yet. Return null if fails
     /// Return a resource by type and name hash. Load if not loaded yet. Return null if fails
     Resource* GetResource(ShortStringHash type, StringHash nameHash);
     Resource* GetResource(ShortStringHash type, StringHash nameHash);
     /// Return all loaded resources of a specific type
     /// Return all loaded resources of a specific type
-    void GetResources(Vector<Resource*>& result, ShortStringHash type) const;
+    void GetResources(PODVector<Resource*>& result, ShortStringHash type) const;
     /// Return all loaded resources
     /// Return all loaded resources
     const Map<ShortStringHash, ResourceGroup>& GetAllResources() const { return resourceGroups_; }
     const Map<ShortStringHash, ResourceGroup>& GetAllResources() const { return resourceGroups_; }
     /// Return added resource load paths
     /// Return added resource load paths
@@ -103,7 +103,7 @@ public:
     /// Template version of returning a resource by name hash
     /// Template version of returning a resource by name hash
     template <class T> T* GetResource(StringHash nameHash);
     template <class T> T* GetResource(StringHash nameHash);
     /// Template version of returning loaded resources of a specific type
     /// Template version of returning loaded resources of a specific type
-    template <class T> void GetResources(Vector<T*>& result) const;
+    template <class T> void GetResources(PODVector<T*>& result) const;
     /// Return whether a file exists by name
     /// Return whether a file exists by name
     bool Exists(const String& name) const;
     bool Exists(const String& name) const;
     /// Return whether a file exists by name hash
     /// Return whether a file exists by name hash
@@ -151,9 +151,9 @@ template <class T> T* ResourceCache::GetResource(StringHash nameHash)
     return static_cast<T*>(GetResource(type, nameHash));
     return static_cast<T*>(GetResource(type, nameHash));
 }
 }
 
 
-template <class T> void ResourceCache::GetResources(Vector<T*>& result) const
+template <class T> void ResourceCache::GetResources(PODVector<T*>& result) const
 {
 {
-    Vector<Resource*>& resources = reinterpret_cast<Vector<Resource*>&>(result);
+    PODVector<Resource*>& resources = reinterpret_cast<PODVector<Resource*>&>(result);
     ShortStringHash type = T::GetTypeStatic();
     ShortStringHash type = T::GetTypeStatic();
     GetResources(resources, type);
     GetResources(resources, type);
     
     

+ 1 - 1
Engine/Scene/Component.cpp

@@ -72,7 +72,7 @@ Component* Component::GetComponent(ShortStringHash type, unsigned index) const
         return 0;
         return 0;
 }
 }
 
 
-void Component::GetComponents(Vector<Component*>& dest, ShortStringHash type) const
+void Component::GetComponents(PODVector<Component*>& dest, ShortStringHash type) const
 {
 {
     if (node_)
     if (node_)
         node_->GetComponents(dest, type);
         node_->GetComponents(dest, type);

+ 4 - 4
Engine/Scene/Component.h

@@ -82,7 +82,7 @@ public:
     }
     }
     
     
     /// Return components in the same scene node by type
     /// Return components in the same scene node by type
-    void GetComponents(Vector<Component*>& dest, ShortStringHash type) const;
+    void GetComponents(PODVector<Component*>& dest, ShortStringHash type) const;
     /// Return component in the same scene node by type. The optional index allows to specify which component, if there are several
     /// Return component in the same scene node by type. The optional index allows to specify which component, if there are several
     Component* GetComponent(ShortStringHash type, unsigned index = 0) const;
     Component* GetComponent(ShortStringHash type, unsigned index = 0) const;
     /// Return whether the same scene node has a specific component
     /// Return whether the same scene node has a specific component
@@ -90,7 +90,7 @@ public:
     /// Template version of returning a component in the same scene node by type
     /// Template version of returning a component in the same scene node by type
     template <class T> T* GetComponent(unsigned index = 0) const;
     template <class T> T* GetComponent(unsigned index = 0) const;
     /// Template version of returning components in the same scene node by type
     /// Template version of returning components in the same scene node by type
-    template <class T> void GetComponents(Vector<T*>& dest) const;
+    template <class T> void GetComponents(PODVector<T*>& dest) const;
     
     
 protected:
 protected:
     /// Set ID. Called by Scene
     /// Set ID. Called by Scene
@@ -109,7 +109,7 @@ template <class T> T* Component::GetComponent(unsigned index) const
     return static_cast<T*>(GetComponent(T::GetTypeStatic(), index));
     return static_cast<T*>(GetComponent(T::GetTypeStatic(), index));
 }
 }
 
 
-template <class T> void Component::GetComponents(Vector<T*>& dest) const
+template <class T> void Component::GetComponents(PODVector<T*>& dest) const
 {
 {
-    GetComponents(reinterpret_cast<Vector<Component*>&>(dest), T::GetTypeStatic());
+    GetComponents(reinterpret_cast<PODVector<Component*>&>(dest), T::GetTypeStatic());
 }
 }

+ 5 - 5
Engine/Scene/Node.cpp

@@ -501,7 +501,7 @@ unsigned Node::GetNumChildren(bool recursive) const
     }
     }
 }
 }
 
 
-void Node::GetChildren(Vector<Node*>& dest, bool recursive) const
+void Node::GetChildren(PODVector<Node*>& dest, bool recursive) const
 {
 {
     dest.Clear();
     dest.Clear();
     
     
@@ -514,7 +514,7 @@ void Node::GetChildren(Vector<Node*>& dest, bool recursive) const
         GetChildrenRecursive(dest);
         GetChildrenRecursive(dest);
 }
 }
 
 
-void Node::GetChildrenWithComponent(Vector<Node*>& dest, ShortStringHash type, bool recursive) const
+void Node::GetChildrenWithComponent(PODVector<Node*>& dest, ShortStringHash type, bool recursive) const
 {
 {
     dest.Clear();
     dest.Clear();
     
     
@@ -558,7 +558,7 @@ Node* Node::GetChild(StringHash nameHash, bool recursive) const
     return 0;
     return 0;
 }
 }
 
 
-void Node::GetComponents(Vector<Component*>& dest, ShortStringHash type) const
+void Node::GetComponents(PODVector<Component*>& dest, ShortStringHash type) const
 {
 {
     dest.Clear();
     dest.Clear();
     for (Vector<SharedPtr<Component> >::ConstIterator i = components_.Begin(); i != components_.End(); ++i)
     for (Vector<SharedPtr<Component> >::ConstIterator i = components_.Begin(); i != components_.End(); ++i)
@@ -753,7 +753,7 @@ void Node::RemoveChild(Vector<SharedPtr<Node> >::Iterator i)
     children_.Erase(i);
     children_.Erase(i);
 }
 }
 
 
-void Node::GetChildrenRecursive(Vector<Node*>& dest) const
+void Node::GetChildrenRecursive(PODVector<Node*>& dest) const
 {
 {
     for (Vector<SharedPtr<Node> >::ConstIterator i = children_.Begin(); i != children_.End(); ++i)
     for (Vector<SharedPtr<Node> >::ConstIterator i = children_.Begin(); i != children_.End(); ++i)
     {
     {
@@ -764,7 +764,7 @@ void Node::GetChildrenRecursive(Vector<Node*>& dest) const
     }
     }
 }
 }
 
 
-void Node::GetChildrenWithComponentRecursive(Vector<Node*>& dest, ShortStringHash type) const
+void Node::GetChildrenWithComponentRecursive(PODVector<Node*>& dest, ShortStringHash type) const
 {
 {
     for (Vector<SharedPtr<Node> >::ConstIterator i = children_.Begin(); i != children_.End(); ++i)
     for (Vector<SharedPtr<Node> >::ConstIterator i = children_.Begin(); i != children_.End(); ++i)
     {
     {

+ 10 - 10
Engine/Scene/Node.h

@@ -198,9 +198,9 @@ public:
     /// Return immediate child scene nodes
     /// Return immediate child scene nodes
     const Vector<SharedPtr<Node> >& GetChildren() const { return children_; }
     const Vector<SharedPtr<Node> >& GetChildren() const { return children_; }
     /// Return child scene nodes, optionally recursive
     /// Return child scene nodes, optionally recursive
-    void GetChildren(Vector<Node*>& dest, bool recursive = false) const;
+    void GetChildren(PODVector<Node*>& dest, bool recursive = false) const;
     /// Return child scene nodes with a specific component
     /// Return child scene nodes with a specific component
-    void GetChildrenWithComponent(Vector<Node*>& dest, ShortStringHash type, bool recursive = false) const;
+    void GetChildrenWithComponent(PODVector<Node*>& dest, ShortStringHash type, bool recursive = false) const;
     /// Return child scene node by index
     /// Return child scene node by index
     Node* GetChild(unsigned index) const;
     Node* GetChild(unsigned index) const;
     /// Return child scene node by name
     /// Return child scene node by name
@@ -212,7 +212,7 @@ public:
     /// Return all components
     /// Return all components
     const Vector<SharedPtr<Component> >& GetComponents() const { return components_; }
     const Vector<SharedPtr<Component> >& GetComponents() const { return components_; }
     /// Return all components of type
     /// Return all components of type
-    void GetComponents(Vector<Component*>& dest, ShortStringHash type) const;
+    void GetComponents(PODVector<Component*>& dest, ShortStringHash type) const;
     /// Return component by index
     /// Return component by index
     Component* GetComponent(unsigned index) const;
     Component* GetComponent(unsigned index) const;
     /// Return component by type. The optional index allows to specify which component, if there are several
     /// Return component by type. The optional index allows to specify which component, if there are several
@@ -224,11 +224,11 @@ public:
     /// Return user variables
     /// Return user variables
     VariantMap& GetVars() { return vars_; }
     VariantMap& GetVars() { return vars_; }
     /// Template version of returning child nodes with a specific component
     /// Template version of returning child nodes with a specific component
-    template <class T> void GetChildrenWithComponent(Vector<Node*>& dest, bool recursive = false) const;
+    template <class T> void GetChildrenWithComponent(PODVector<Node*>& dest, bool recursive = false) const;
     /// Template version of returning a component by type
     /// Template version of returning a component by type
     template <class T> T* GetComponent(unsigned index = 0) const;
     template <class T> T* GetComponent(unsigned index = 0) const;
     /// Template version of returning all components of type
     /// Template version of returning all components of type
-    template <class T> void GetComponents(Vector<T*>& dest) const;
+    template <class T> void GetComponents(PODVector<T*>& dest) const;
     /// Template version of checking whether has a specific component
     /// Template version of checking whether has a specific component
     template <class T> bool HasComponent() const;
     template <class T> bool HasComponent() const;
     
     
@@ -258,9 +258,9 @@ private:
     /// Remove child node by iterator
     /// Remove child node by iterator
     void RemoveChild(Vector<SharedPtr<Node> >::Iterator i);
     void RemoveChild(Vector<SharedPtr<Node> >::Iterator i);
     /// Return child nodes recursively
     /// Return child nodes recursively
-    void GetChildrenRecursive(Vector<Node*>& dest) const;
+    void GetChildrenRecursive(PODVector<Node*>& dest) const;
     /// Return child nodes with a specific component recursively
     /// Return child nodes with a specific component recursively
-    void GetChildrenWithComponentRecursive(Vector<Node*>& dest, ShortStringHash type) const;
+    void GetChildrenWithComponentRecursive(PODVector<Node*>& dest, ShortStringHash type) const;
     
     
     /// Unique ID within the scene
     /// Unique ID within the scene
     unsigned id_;
     unsigned id_;
@@ -304,7 +304,7 @@ template <class T> T* Node::GetOrCreateComponent(bool local)
     return static_cast<T*>(GetOrCreateComponent(T::GetTypeStatic(), local));
     return static_cast<T*>(GetOrCreateComponent(T::GetTypeStatic(), local));
 }
 }
 
 
-template <class T> void Node::GetChildrenWithComponent(Vector<Node*>& dest, bool recursive) const
+template <class T> void Node::GetChildrenWithComponent(PODVector<Node*>& dest, bool recursive) const
 {
 {
     GetChildrenWithComponent(dest, T::GetTypeStatic(), recursive);
     GetChildrenWithComponent(dest, T::GetTypeStatic(), recursive);
 }
 }
@@ -314,9 +314,9 @@ template <class T> T* Node::GetComponent(unsigned index) const
     return static_cast<T*>(GetComponent(T::GetTypeStatic(), index));
     return static_cast<T*>(GetComponent(T::GetTypeStatic(), index));
 }
 }
 
 
-template <class T> void Node::GetComponents(Vector<T*>& dest) const
+template <class T> void Node::GetComponents(PODVector<T*>& dest) const
 {
 {
-    GetComponents(reinterpret_cast<Vector<Component*>&>(dest), T::GetTypeStatic());
+    GetComponents(reinterpret_cast<PODVector<Component*>&>(dest), T::GetTypeStatic());
 }
 }
 
 
 template <class T> bool Node::HasComponent() const
 template <class T> bool Node::HasComponent() const

+ 0 - 1
Engine/Script/Precompiled.h

@@ -24,5 +24,4 @@
 #pragma once
 #pragma once
 
 
 #include "Map.h"
 #include "Map.h"
-#include "PODVector.h"
 #include "StringBase.h"
 #include "StringBase.h"

+ 1 - 1
Engine/UI/DropDownList.cpp

@@ -190,7 +190,7 @@ UIElement* DropDownList::GetItem(unsigned index) const
     return listView_->GetItem(index);
     return listView_->GetItem(index);
 }
 }
 
 
-Vector<UIElement*> DropDownList::GetItems() const
+PODVector<UIElement*> DropDownList::GetItems() const
 {
 {
     return listView_->GetContentElement()->GetChildren();
     return listView_->GetContentElement()->GetChildren();
 }
 }

+ 1 - 1
Engine/UI/DropDownList.h

@@ -69,7 +69,7 @@ public:
     /// Return item at index
     /// Return item at index
     UIElement* GetItem(unsigned index) const;
     UIElement* GetItem(unsigned index) const;
     /// Return all items
     /// Return all items
-    Vector<UIElement*> GetItems() const;
+    PODVector<UIElement*> GetItems() const;
     /// Return selection index, or M_MAX_UNSIGNED if none selected
     /// Return selection index, or M_MAX_UNSIGNED if none selected
     unsigned GetSelection() const;
     unsigned GetSelection() const;
     /// Return selected item, or null if none selected
     /// Return selected item, or null if none selected

+ 2 - 2
Engine/UI/FileSelector.cpp

@@ -181,11 +181,11 @@ void FileSelector::SetStyle(XMLFile* style)
     okButton_->SetStyle(style, "FileSelectorButton");
     okButton_->SetStyle(style, "FileSelectorButton");
     cancelButton_->SetStyle(style, "FileSelectorButton");
     cancelButton_->SetStyle(style, "FileSelectorButton");
     
     
-    Vector<UIElement*> filterTexts = filterList_->GetListView()->GetContentElement()->GetChildren();
+    PODVector<UIElement*> filterTexts = filterList_->GetListView()->GetContentElement()->GetChildren();
     for (unsigned i = 0; i < filterTexts.Size(); ++i)
     for (unsigned i = 0; i < filterTexts.Size(); ++i)
         filterTexts[i]->SetStyle(style, "FileSelectorFilterText");
         filterTexts[i]->SetStyle(style, "FileSelectorFilterText");
     
     
-    Vector<UIElement*> listTexts = fileList_->GetContentElement()->GetChildren();
+    PODVector<UIElement*> listTexts = fileList_->GetContentElement()->GetChildren();
     for (unsigned i = 0; i < listTexts.Size(); ++i)
     for (unsigned i = 0; i < listTexts.Size(); ++i)
         listTexts[i]->SetStyle(style, "FileSelectorListText");
         listTexts[i]->SetStyle(style, "FileSelectorListText");
     
     

+ 1 - 1
Engine/UI/Font.cpp

@@ -152,7 +152,7 @@ const FontFace* Font::GetFace(int pointSize)
     FT_GlyphSlot slot = face->glyph;
     FT_GlyphSlot slot = face->glyph;
     unsigned freeIndex = 0;
     unsigned freeIndex = 0;
     Map<unsigned, unsigned> toRemapped;
     Map<unsigned, unsigned> toRemapped;
-    Vector<unsigned> toOriginal;
+    PODVector<unsigned> toOriginal;
     
     
     // Build glyph mapping. Only render the glyphs needed by the charset
     // Build glyph mapping. Only render the glyphs needed by the charset
     for (unsigned i = 0; i < MAX_FONT_CHARS; ++i)
     for (unsigned i = 0; i < MAX_FONT_CHARS; ++i)

+ 2 - 2
Engine/UI/LineEdit.cpp

@@ -518,7 +518,7 @@ void LineEdit::UpdateText()
 void LineEdit::UpdateCursor()
 void LineEdit::UpdateCursor()
 {
 {
     int x = 0;
     int x = 0;
-    const Vector<IntVector2>& charPositions = text_->GetCharPositions();
+    const PODVector<IntVector2>& charPositions = text_->GetCharPositions();
     if (charPositions.Size())
     if (charPositions.Size())
         x = cursorPosition_ < charPositions.Size() ? charPositions[cursorPosition_].x_ : charPositions.Back().x_;
         x = cursorPosition_ < charPositions.Size() ? charPositions[cursorPosition_].x_ : charPositions.Back().x_;
     
     
@@ -543,7 +543,7 @@ unsigned LineEdit::GetCharIndex(const IntVector2& position)
 {
 {
     IntVector2 screenPosition = ElementToScreen(position);
     IntVector2 screenPosition = ElementToScreen(position);
     IntVector2 textPosition = text_->ScreenToElement(screenPosition);
     IntVector2 textPosition = text_->ScreenToElement(screenPosition);
-    const Vector<IntVector2>& charPositions = text_->GetCharPositions();
+    const PODVector<IntVector2>& charPositions = text_->GetCharPositions();
     
     
     if (textPosition.x_ < 0)
     if (textPosition.x_ < 0)
         return 0;
         return 0;

+ 3 - 3
Engine/UI/ListView.cpp

@@ -607,7 +607,7 @@ UIElement* ListView::GetItem(unsigned index) const
     return contentElement_->GetChild(index);
     return contentElement_->GetChild(index);
 }
 }
 
 
-Vector<UIElement*> ListView::GetItems() const
+PODVector<UIElement*> ListView::GetItems() const
 {
 {
     return contentElement_->GetChildren();
     return contentElement_->GetChildren();
 }
 }
@@ -625,9 +625,9 @@ UIElement* ListView::GetSelectedItem() const
     return contentElement_->GetChild(GetSelection());
     return contentElement_->GetChild(GetSelection());
 }
 }
 
 
-Vector<UIElement*> ListView::GetSelectedItems() const
+PODVector<UIElement*> ListView::GetSelectedItems() const
 {
 {
-    Vector<UIElement*> ret;
+    PODVector<UIElement*> ret;
     for (Set<unsigned>::ConstIterator i = selections_.Begin(); i != selections_.End(); ++i)
     for (Set<unsigned>::ConstIterator i = selections_.Begin(); i != selections_.End(); ++i)
     {
     {
         UIElement* item = GetItem(*i);
         UIElement* item = GetItem(*i);

+ 2 - 2
Engine/UI/ListView.h

@@ -111,7 +111,7 @@ public:
     /// Return item at index
     /// Return item at index
     UIElement* GetItem(unsigned index) const;
     UIElement* GetItem(unsigned index) const;
     /// Return all items
     /// Return all items
-    Vector<UIElement*> GetItems() const;
+    PODVector<UIElement*> GetItems() const;
     /// Return first selected index, or M_MAX_UNSIGNED if none selected
     /// Return first selected index, or M_MAX_UNSIGNED if none selected
     unsigned GetSelection() const;
     unsigned GetSelection() const;
     /// Return all selected indices
     /// Return all selected indices
@@ -119,7 +119,7 @@ public:
     /// Return first selected item, or null if none selected
     /// Return first selected item, or null if none selected
     UIElement* GetSelectedItem() const;
     UIElement* GetSelectedItem() const;
     /// Return all selected items
     /// Return all selected items
-    Vector<UIElement*> GetSelectedItems() const;
+    PODVector<UIElement*> GetSelectedItems() const;
     /// Return highlight mode
     /// Return highlight mode
     HighlightMode GetHighlightMode() const { return highlightMode_; }
     HighlightMode GetHighlightMode() const { return highlightMode_; }
     /// Return whether multiselect enabled
     /// Return whether multiselect enabled

+ 0 - 1
Engine/UI/Precompiled.h

@@ -24,5 +24,4 @@
 #pragma once
 #pragma once
 
 
 #include "Map.h"
 #include "Map.h"
-#include "PODVector.h"
 #include "StringBase.h"
 #include "StringBase.h"

+ 1 - 1
Engine/UI/Text.cpp

@@ -341,7 +341,7 @@ void Text::UpdateText(bool inResize)
     rowWidths_.Clear();
     rowWidths_.Clear();
     printText_.Clear();
     printText_.Clear();
     
     
-    Vector<unsigned> printToText;
+    PODVector<unsigned> printToText;
     
     
     if (font_)
     if (font_)
     {
     {

+ 6 - 6
Engine/UI/Text.h

@@ -97,11 +97,11 @@ public:
     /// Return number of rows
     /// Return number of rows
     unsigned GetNumRows() const { return rowWidths_.Size(); }
     unsigned GetNumRows() const { return rowWidths_.Size(); }
     /// Return width of each row
     /// Return width of each row
-    const Vector<int>& GetRowWidths() const { return rowWidths_; }
+    const PODVector<int>& GetRowWidths() const { return rowWidths_; }
     /// Return position of each character
     /// Return position of each character
-    const Vector<IntVector2>& GetCharPositions() const { return charPositions_; }
+    const PODVector<IntVector2>& GetCharPositions() const { return charPositions_; }
     /// Return size of each character
     /// Return size of each character
-    const Vector<IntVector2>& GetCharSizes() const { return charSizes_; }
+    const PODVector<IntVector2>& GetCharSizes() const { return charSizes_; }
     
     
 protected:
 protected:
     /// Update text when text, font or spacing changed
     /// Update text when text, font or spacing changed
@@ -136,9 +136,9 @@ protected:
     /// Row height
     /// Row height
     int rowHeight_;
     int rowHeight_;
     /// Row widths
     /// Row widths
-    Vector<int> rowWidths_;
+    PODVector<int> rowWidths_;
     /// Positions of each character
     /// Positions of each character
-    Vector<IntVector2> charPositions_;
+    PODVector<IntVector2> charPositions_;
     /// Sizes of each character
     /// Sizes of each character
-    Vector<IntVector2> charSizes_;
+    PODVector<IntVector2> charSizes_;
 };
 };

+ 14 - 14
Engine/UI/UI.cpp

@@ -130,10 +130,10 @@ void UI::SetFocusElement(UIElement* element)
         }
         }
     }
     }
     
     
-    Vector<UIElement*> allChildren = rootElement_->GetChildren(true);
+    PODVector<UIElement*> allChildren = rootElement_->GetChildren(true);
     
     
     // Go through all elements to clear the old focus
     // Go through all elements to clear the old focus
-    for (Vector<UIElement*>::Iterator i = allChildren.Begin(); i != allChildren.End(); ++i)
+    for (PODVector<UIElement*>::Iterator i = allChildren.Begin(); i != allChildren.End(); ++i)
     {
     {
         UIElement* other = *i;
         UIElement* other = *i;
         if ((other != element) && (other->HasFocus()))
         if ((other != element) && (other->HasFocus()))
@@ -342,8 +342,8 @@ UIElement* UI::GetElementAt(int x, int y, bool activeOnly)
 
 
 UIElement* UI::GetFocusElement() const
 UIElement* UI::GetFocusElement() const
 {
 {
-    Vector<UIElement*> allChildren = rootElement_->GetChildren(true);
-    for (Vector<UIElement*>::Iterator i = allChildren.Begin(); i != allChildren.End(); ++i)
+    PODVector<UIElement*> allChildren = rootElement_->GetChildren(true);
+    for (PODVector<UIElement*>::Iterator i = allChildren.Begin(); i != allChildren.End(); ++i)
     {
     {
         if ((*i)->HasFocus())
         if ((*i)->HasFocus())
             return *i;
             return *i;
@@ -354,7 +354,7 @@ UIElement* UI::GetFocusElement() const
 
 
 UIElement* UI::GetFrontElement() const
 UIElement* UI::GetFrontElement() const
 {
 {
-    Vector<UIElement*> rootChildren = rootElement_->GetChildren(false);
+    PODVector<UIElement*> rootChildren = rootElement_->GetChildren(false);
     int maxPriority = M_MIN_INT;
     int maxPriority = M_MIN_INT;
     UIElement* front = 0;
     UIElement* front = 0;
     
     
@@ -413,8 +413,8 @@ void UI::Update(float timeStep, UIElement* element)
 {
 {
     element->Update(timeStep);
     element->Update(timeStep);
     
     
-    const Vector<UIElement*> children = element->GetChildren();
-    for (Vector<UIElement*>::ConstIterator i = children.Begin(); i != children.End(); ++i)
+    const PODVector<UIElement*> children = element->GetChildren();
+    for (PODVector<UIElement*>::ConstIterator i = children.Begin(); i != children.End(); ++i)
         Update(timeStep, *i);
         Update(timeStep, *i);
 }
 }
 
 
@@ -425,7 +425,7 @@ void UI::GetBatches(UIElement* element, IntRect currentScissor)
     if ((currentScissor.left_ == currentScissor.right_) || (currentScissor.top_ == currentScissor.bottom_))
     if ((currentScissor.left_ == currentScissor.right_) || (currentScissor.top_ == currentScissor.bottom_))
         return;
         return;
     
     
-    Vector<UIElement*> children = element->GetChildren();
+    PODVector<UIElement*> children = element->GetChildren();
     if (children.Empty())
     if (children.Empty())
         return;
         return;
     
     
@@ -433,10 +433,10 @@ void UI::GetBatches(UIElement* element, IntRect currentScissor)
     
     
     // For non-root elements draw all children of same priority before recursing into their children: assumption is that they have
     // For non-root elements draw all children of same priority before recursing into their children: assumption is that they have
     // same renderstate
     // same renderstate
-    Vector<UIElement*>::ConstIterator i = children.Begin();
+    PODVector<UIElement*>::ConstIterator i = children.Begin();
     if (element != rootElement_)
     if (element != rootElement_)
     {
     {
-        Vector<UIElement*>::ConstIterator j = i;
+        PODVector<UIElement*>::ConstIterator j = i;
         int currentPriority = children.Front()->GetPriority();
         int currentPriority = children.Front()->GetPriority();
         while (i != children.End())
         while (i != children.End())
         {
         {
@@ -478,10 +478,10 @@ void UI::GetElementAt(UIElement*& result, UIElement* current, const IntVector2&
         return;
         return;
     
     
     // Get children from lowest priority to highest
     // Get children from lowest priority to highest
-    Vector<UIElement*> children = current->GetChildren(false);
+    PODVector<UIElement*> children = current->GetChildren(false);
     Sort(children.Begin(), children.End(), CompareUIElements);
     Sort(children.Begin(), children.End(), CompareUIElements);
     
     
-    for (Vector<UIElement*>::ConstIterator i = children.Begin(); i != children.End(); ++i)
+    for (PODVector<UIElement*>::ConstIterator i = children.Begin(); i != children.End(); ++i)
     {
     {
         UIElement* element = *i;
         UIElement* element = *i;
         if ((element != cursor_.GetPtr()) && (element->IsVisible()))
         if ((element != cursor_.GetPtr()) && (element->IsVisible()))
@@ -733,8 +733,8 @@ void UI::HandleKeyDown(StringHash eventType, VariantMap& eventData)
                 topLevel = topLevel->GetParent();
                 topLevel = topLevel->GetParent();
             if (topLevel)
             if (topLevel)
             {
             {
-                Vector<UIElement*> children = topLevel->GetChildren(true);
-                for (Vector<UIElement*>::Iterator i = children.Begin(); i != children.End();)
+                PODVector<UIElement*> children = topLevel->GetChildren(true);
+                for (PODVector<UIElement*>::Iterator i = children.Begin(); i != children.End();)
                 {
                 {
                     if ((*i)->GetFocusMode() < FM_FOCUSABLE)
                     if ((*i)->GetFocusMode() < FM_FOCUSABLE)
                         i = children.Erase(i);
                         i = children.Erase(i);

+ 0 - 1
Engine/UI/UIBatch.h

@@ -24,7 +24,6 @@
 #pragma once
 #pragma once
 
 
 #include "Color.h"
 #include "Color.h"
-#include "PODVector.h"
 #include "Rect.h"
 #include "Rect.h"
 #include "GraphicsDefs.h"
 #include "GraphicsDefs.h"
 
 

+ 14 - 14
Engine/UI/UIElement.cpp

@@ -629,10 +629,10 @@ void UIElement::UpdateLayout()
     // Prevent further updates while this update happens
     // Prevent further updates while this update happens
     DisableLayoutUpdate();
     DisableLayoutUpdate();
     
     
-    Vector<int> positions;
-    Vector<int> sizes;
-    Vector<int> minSizes;
-    Vector<int> maxSizes;
+    PODVector<int> positions;
+    PODVector<int> sizes;
+    PODVector<int> minSizes;
+    PODVector<int> maxSizes;
     
     
     if (layoutMode_ == LM_HORIZONTAL)
     if (layoutMode_ == LM_HORIZONTAL)
     {
     {
@@ -748,8 +748,8 @@ void UIElement::BringToFront()
     // and decrease others' priority by one. However, take into account only active (enabled) elements
     // and decrease others' priority by one. However, take into account only active (enabled) elements
     // and those which have the BringToBack flag set
     // and those which have the BringToBack flag set
     int maxPriority = M_MIN_INT;
     int maxPriority = M_MIN_INT;
-    Vector<UIElement*> topLevelElements = root->GetChildren();
-    for (Vector<UIElement*>::Iterator i = topLevelElements.Begin(); i != topLevelElements.End(); ++i)
+    PODVector<UIElement*> topLevelElements = root->GetChildren();
+    for (PODVector<UIElement*>::Iterator i = topLevelElements.Begin(); i != topLevelElements.End(); ++i)
     {
     {
         UIElement* other = *i;
         UIElement* other = *i;
         if ((other->IsActive()) && (other->bringToBack_) && (other != ptr))
         if ((other->IsActive()) && (other->bringToBack_) && (other != ptr))
@@ -898,11 +898,11 @@ float UIElement::GetDerivedOpacity()
     return derivedOpacity_;
     return derivedOpacity_;
 }
 }
 
 
-Vector<UIElement*> UIElement::GetChildren(bool recursive) const
+PODVector<UIElement*> UIElement::GetChildren(bool recursive) const
 {
 {
     if (!recursive)
     if (!recursive)
     {
     {
-        Vector<UIElement*> ret;
+        PODVector<UIElement*> ret;
         for (Vector<SharedPtr<UIElement> >::ConstIterator i = children_.Begin(); i != children_.End(); ++i)
         for (Vector<SharedPtr<UIElement> >::ConstIterator i = children_.Begin(); i != children_.End(); ++i)
             ret.Push(*i);
             ret.Push(*i);
         
         
@@ -910,7 +910,7 @@ Vector<UIElement*> UIElement::GetChildren(bool recursive) const
     }
     }
     else
     else
     {
     {
-        Vector<UIElement*> allChildren;
+        PODVector<UIElement*> allChildren;
         GetChildrenRecursive(allChildren);
         GetChildrenRecursive(allChildren);
         
         
         return allChildren;
         return allChildren;
@@ -1093,7 +1093,7 @@ void UIElement::MarkDirty()
         (*i)->MarkDirty();
         (*i)->MarkDirty();
 }
 }
 
 
-void UIElement::GetChildrenRecursive(Vector<UIElement*>& dest) const
+void UIElement::GetChildrenRecursive(PODVector<UIElement*>& dest) const
 {
 {
     for (Vector<SharedPtr<UIElement> >::ConstIterator i = children_.Begin(); i != children_.End(); ++i)
     for (Vector<SharedPtr<UIElement> >::ConstIterator i = children_.Begin(); i != children_.End(); ++i)
     {
     {
@@ -1102,7 +1102,7 @@ void UIElement::GetChildrenRecursive(Vector<UIElement*>& dest) const
     }
     }
 }
 }
 
 
-int UIElement::CalculateLayoutParentSize(const Vector<int>& sizes, int begin, int end, int spacing)
+int UIElement::CalculateLayoutParentSize(const PODVector<int>& sizes, int begin, int end, int spacing)
 {
 {
     int width = begin + end;
     int width = begin + end;
     for (unsigned i = 0; i < sizes.Size(); ++i)
     for (unsigned i = 0; i < sizes.Size(); ++i)
@@ -1117,8 +1117,8 @@ int UIElement::CalculateLayoutParentSize(const Vector<int>& sizes, int begin, in
     return width;
     return width;
 }
 }
 
 
-void UIElement::CalculateLayout(Vector<int>& positions, Vector<int>& sizes, const Vector<int>& minSizes,
-        const Vector<int>& maxSizes, int targetSize, int begin, int end, int spacing)
+void UIElement::CalculateLayout(PODVector<int>& positions, PODVector<int>& sizes, const PODVector<int>& minSizes,
+        const PODVector<int>& maxSizes, int targetSize, int begin, int end, int spacing)
 {
 {
     int numChildren = sizes.Size();
     int numChildren = sizes.Size();
     if (!numChildren)
     if (!numChildren)
@@ -1160,7 +1160,7 @@ void UIElement::CalculateLayout(Vector<int>& positions, Vector<int>& sizes, cons
             break;
             break;
         
         
         // Check which of the children can be resized to correct the error. If none, must break
         // Check which of the children can be resized to correct the error. If none, must break
-        Vector<unsigned> resizable;
+        PODVector<unsigned> resizable;
         for (int i = 0; i < numChildren; ++i)
         for (int i = 0; i < numChildren; ++i)
         {
         {
             if ((error < 0) && (sizes[i] > minSizes[i]))
             if ((error < 0) && (sizes[i] > minSizes[i]))

+ 5 - 5
Engine/UI/UIElement.h

@@ -325,7 +325,7 @@ public:
     /// Return child element by name
     /// Return child element by name
     UIElement* GetChild(const String& name, bool recursive = false) const;
     UIElement* GetChild(const String& name, bool recursive = false) const;
     /// Return all child elements
     /// Return all child elements
-    Vector<UIElement*> GetChildren(bool recursive = false) const;
+    PODVector<UIElement*> GetChildren(bool recursive = false) const;
     /// Return parent element
     /// Return parent element
     UIElement* GetParent() const { return parent_; }
     UIElement* GetParent() const { return parent_; }
     /// Return root element
     /// Return root element
@@ -408,12 +408,12 @@ protected:
     
     
 private:
 private:
     /// Return child elements recursively
     /// Return child elements recursively
-    void GetChildrenRecursive(Vector<UIElement*>& dest) const;
+    void GetChildrenRecursive(PODVector<UIElement*>& dest) const;
     /// Calculate layout width for resizing the parent element
     /// Calculate layout width for resizing the parent element
-    int CalculateLayoutParentSize(const Vector<int>& sizes, int begin, int end, int spacing);
+    int CalculateLayoutParentSize(const PODVector<int>& sizes, int begin, int end, int spacing);
     /// Calculate child widths/positions in the layout
     /// Calculate child widths/positions in the layout
-    void CalculateLayout(Vector<int>& positions, Vector<int>& sizes, const Vector<int>& minSizes,
-        const Vector<int>& maxSizes, int targetWidth, int begin, int end, int spacing);
+    void CalculateLayout(PODVector<int>& positions, PODVector<int>& sizes, const PODVector<int>& minSizes,
+        const PODVector<int>& maxSizes, int targetWidth, int begin, int end, int spacing);
     /// Get child element constant position in a layout
     /// Get child element constant position in a layout
     IntVector2 GetLayoutChildPosition(UIElement* child);
     IntVector2 GetLayoutChildPosition(UIElement* child);
     
     

+ 24 - 24
Tools/AssetImporter/AssetImporter.cpp

@@ -76,12 +76,12 @@ struct OutModel
     String outName_;
     String outName_;
     aiNode* rootNode_;
     aiNode* rootNode_;
     Set<unsigned> meshIndices_;
     Set<unsigned> meshIndices_;
-    Vector<aiMesh*> meshes_;
-    Vector<aiNode*> meshNodes_;
-    Vector<aiNode*> bones_;
-    Vector<aiAnimation*> animations_;
-    Vector<float> boneRadii_;
-    Vector<BoundingBox> boneHitboxes_;
+    PODVector<aiMesh*> meshes_;
+    PODVector<aiNode*> meshNodes_;
+    PODVector<aiNode*> bones_;
+    PODVector<aiAnimation*> animations_;
+    PODVector<float> boneRadii_;
+    PODVector<BoundingBox> boneHitboxes_;
     aiNode* rootBone_;
     aiNode* rootBone_;
     unsigned totalVertices_;
     unsigned totalVertices_;
     unsigned totalIndices_;
     unsigned totalIndices_;
@@ -92,8 +92,8 @@ struct OutScene
     String outName_;
     String outName_;
     aiNode* rootNode_;
     aiNode* rootNode_;
     Vector<OutModel> models_;
     Vector<OutModel> models_;
-    Vector<aiNode*> nodes_;
-    Vector<unsigned> nodeModelIndices_;
+    PODVector<aiNode*> nodes_;
+    PODVector<unsigned> nodeModelIndices_;
 };
 };
 
 
 SharedPtr<Context> context_(new Context());
 SharedPtr<Context> context_(new Context());
@@ -116,7 +116,7 @@ void DumpNodes(aiNode* rootNode, unsigned level);
 void ExportModel(const String& outName);
 void ExportModel(const String& outName);
 void CollectMeshes(OutModel& model, aiNode* node);
 void CollectMeshes(OutModel& model, aiNode* node);
 void CollectBones(OutModel& model);
 void CollectBones(OutModel& model);
-void CollectBonesFinal(Vector<aiNode*>& dest, const Set<aiNode*>& necessary, aiNode* node);
+void CollectBonesFinal(PODVector<aiNode*>& dest, const Set<aiNode*>& necessary, aiNode* node);
 void CollectAnimations(OutModel& model);
 void CollectAnimations(OutModel& model);
 void BuildBoneCollisionInfo(OutModel& model);
 void BuildBoneCollisionInfo(OutModel& model);
 void BuildAndSaveModel(OutModel& model);
 void BuildAndSaveModel(OutModel& model);
@@ -130,22 +130,22 @@ void ExportMaterials(Set<String>& usedTextures);
 void BuildAndSaveMaterial(aiMaterial* material, Set<String>& usedTextures);
 void BuildAndSaveMaterial(aiMaterial* material, Set<String>& usedTextures);
 void CopyTextures(const Set<String>& usedTextures, const String& sourcePath);
 void CopyTextures(const Set<String>& usedTextures, const String& sourcePath);
 
 
-void CombineLods(const Vector<float>& lodDistances, const Vector<String>& modelNames, const String& outName);
+void CombineLods(const PODVector<float>& lodDistances, const Vector<String>& modelNames, const String& outName);
 
 
 void GetMeshesUnderNode(Vector<Pair<aiNode*, aiMesh*> >& meshes, aiNode* node);
 void GetMeshesUnderNode(Vector<Pair<aiNode*, aiMesh*> >& meshes, aiNode* node);
 unsigned GetMeshIndex(aiMesh* mesh);
 unsigned GetMeshIndex(aiMesh* mesh);
 unsigned GetBoneIndex(OutModel& model, const String& boneName);
 unsigned GetBoneIndex(OutModel& model, const String& boneName);
 aiBone* GetMeshBone(OutModel& model, const String& boneName);
 aiBone* GetMeshBone(OutModel& model, const String& boneName);
 Matrix4x3 GetOffsetMatrix(OutModel& model, const String& boneName);
 Matrix4x3 GetOffsetMatrix(OutModel& model, const String& boneName);
-void GetBlendData(OutModel& model, aiMesh* mesh, Vector<unsigned>& boneMappings, Vector<PODVector<unsigned char> >&
-    blendIndices, Vector<Vector<float> >& blendWeights);
+void GetBlendData(OutModel& model, aiMesh* mesh, PODVector<unsigned>& boneMappings, Vector<PODVector<unsigned char> >&
+    blendIndices, Vector<PODVector<float> >& blendWeights);
 String GetMeshMaterialName(aiMesh* mesh);
 String GetMeshMaterialName(aiMesh* mesh);
 
 
 void WriteShortIndices(unsigned short*& dest, aiMesh* mesh, unsigned index, unsigned offset);
 void WriteShortIndices(unsigned short*& dest, aiMesh* mesh, unsigned index, unsigned offset);
 void WriteLargeIndices(unsigned*& dest, aiMesh* mesh, unsigned index, unsigned offset);
 void WriteLargeIndices(unsigned*& dest, aiMesh* mesh, unsigned index, unsigned offset);
 void WriteVertex(float*& dest, aiMesh* mesh, unsigned index, unsigned elementMask, BoundingBox& box,
 void WriteVertex(float*& dest, aiMesh* mesh, unsigned index, unsigned elementMask, BoundingBox& box,
     const Matrix4x3& vertexTransform, const Matrix3& normalTransform, Vector<PODVector<unsigned char> >& blendIndices,
     const Matrix4x3& vertexTransform, const Matrix3& normalTransform, Vector<PODVector<unsigned char> >& blendIndices,
-    Vector<Vector<float> >& blendWeights);
+    Vector<PODVector<float> >& blendWeights);
 unsigned GetElementMask(aiMesh* mesh);
 unsigned GetElementMask(aiMesh* mesh);
 
 
 aiNode* FindNode(const String& name, aiNode* rootNode, bool caseSensitive = true);
 aiNode* FindNode(const String& name, aiNode* rootNode, bool caseSensitive = true);
@@ -355,7 +355,7 @@ void Run(const Vector<String>& arguments)
     }
     }
     else
     else
     {
     {
-        Vector<float> lodDistances;
+        PODVector<float> lodDistances;
         Vector<String> modelNames;
         Vector<String> modelNames;
         String outFile;
         String outFile;
         
         
@@ -542,7 +542,7 @@ void CollectBones(OutModel& model)
     }
     }
 }
 }
 
 
-void CollectBonesFinal(Vector<aiNode*>& dest, const Set<aiNode*>& necessary, aiNode* node)
+void CollectBonesFinal(PODVector<aiNode*>& dest, const Set<aiNode*>& necessary, aiNode* node)
 {
 {
     if (necessary.Find(node) != necessary.End())
     if (necessary.Find(node) != necessary.End())
     {
     {
@@ -618,7 +618,7 @@ void BuildAndSaveModel(OutModel& model)
     
     
     SharedPtr<Model> outModel(new Model(context_));
     SharedPtr<Model> outModel(new Model(context_));
     outModel->SetNumGeometries(model.meshes_.Size());
     outModel->SetNumGeometries(model.meshes_.Size());
-    Vector<Vector<unsigned> > allBoneMappings;
+    Vector<PODVector<unsigned> > allBoneMappings;
     BoundingBox box;
     BoundingBox box;
     
     
     bool combineBuffers = true;
     bool combineBuffers = true;
@@ -691,8 +691,8 @@ void BuildAndSaveModel(OutModel& model)
             // Build the vertex data
             // Build the vertex data
             // If there are bones, get blend data
             // If there are bones, get blend data
             Vector<PODVector<unsigned char> > blendIndices;
             Vector<PODVector<unsigned char> > blendIndices;
-            Vector<Vector<float> > blendWeights;
-            Vector<unsigned> boneMappings;
+            Vector<PODVector<float> > blendWeights;
+            PODVector<unsigned> boneMappings;
             if (model.bones_.Size())
             if (model.bones_.Size())
                 GetBlendData(model, mesh, boneMappings, blendIndices, blendWeights);
                 GetBlendData(model, mesh, boneMappings, blendIndices, blendWeights);
             
             
@@ -765,8 +765,8 @@ void BuildAndSaveModel(OutModel& model)
             // Build the vertex data
             // Build the vertex data
             // If there are bones, get blend data
             // If there are bones, get blend data
             Vector<PODVector<unsigned char> > blendIndices;
             Vector<PODVector<unsigned char> > blendIndices;
-            Vector<Vector<float> > blendWeights;
-            Vector<unsigned> boneMappings;
+            Vector<PODVector<float> > blendWeights;
+            PODVector<unsigned> boneMappings;
             if (model.bones_.Size())
             if (model.bones_.Size())
                 GetBlendData(model, mesh, boneMappings, blendIndices, blendWeights);
                 GetBlendData(model, mesh, boneMappings, blendIndices, blendWeights);
             
             
@@ -1263,7 +1263,7 @@ void CopyTextures(const Set<String>& usedTextures, const String& sourcePath)
     }
     }
 }
 }
 
 
-void CombineLods(const Vector<float>& lodDistances, const Vector<String>& modelNames, const String& outName)
+void CombineLods(const PODVector<float>& lodDistances, const Vector<String>& modelNames, const String& outName)
 {
 {
     // Load models
     // Load models
     Vector<SharedPtr<Model> > srcModels;
     Vector<SharedPtr<Model> > srcModels;
@@ -1400,8 +1400,8 @@ Matrix4x3 GetOffsetMatrix(OutModel& model, const String& boneName)
     return Matrix4x3::IDENTITY;
     return Matrix4x3::IDENTITY;
 }
 }
 
 
-void GetBlendData(OutModel& model, aiMesh* mesh, Vector<unsigned>& boneMappings, Vector<PODVector<unsigned char> >&
-    blendIndices, Vector<Vector<float> >& blendWeights)
+void GetBlendData(OutModel& model, aiMesh* mesh, PODVector<unsigned>& boneMappings, Vector<PODVector<unsigned char> >&
+    blendIndices, Vector<PODVector<float> >& blendWeights)
 {
 {
     blendIndices.Resize(mesh->mNumVertices);
     blendIndices.Resize(mesh->mNumVertices);
     blendWeights.Resize(mesh->mNumVertices);
     blendWeights.Resize(mesh->mNumVertices);
@@ -1480,7 +1480,7 @@ void WriteLargeIndices(unsigned*& dest, aiMesh* mesh, unsigned index, unsigned o
 
 
 void WriteVertex(float*& dest, aiMesh* mesh, unsigned index, unsigned elementMask, BoundingBox& box,
 void WriteVertex(float*& dest, aiMesh* mesh, unsigned index, unsigned elementMask, BoundingBox& box,
     const Matrix4x3& vertexTransform, const Matrix3& normalTransform, Vector<PODVector<unsigned char> >& blendIndices,
     const Matrix4x3& vertexTransform, const Matrix3& normalTransform, Vector<PODVector<unsigned char> >& blendIndices,
-    Vector<Vector<float> >& blendWeights)
+    Vector<PODVector<float> >& blendWeights)
 {
 {
     Vector3 vertex = vertexTransform * ToVector3(mesh->mVertices[index]);
     Vector3 vertex = vertexTransform * ToVector3(mesh->mVertices[index]);
     box.Merge(vertex);
     box.Merge(vertex);

+ 1 - 1
Tools/OgreImporter/OgreImporter.cpp

@@ -284,7 +284,7 @@ void LoadMesh(const String& inputFileName, bool generateTangents, bool splitSubM
     unsigned vertexStart = 0;
     unsigned vertexStart = 0;
     unsigned subMeshIndex = 0;
     unsigned subMeshIndex = 0;
     
     
-    Vector<unsigned> vertexStarts;
+    PODVector<unsigned> vertexStarts;
     vertexStarts.Resize(numSubMeshes_);
     vertexStarts.Resize(numSubMeshes_);
     
     
     while (subMesh)
     while (subMesh)

+ 2 - 2
Tools/OgreImporter/OgreImporterUtils.h

@@ -187,7 +187,7 @@ struct ModelMorph
 struct ModelIndexBuffer
 struct ModelIndexBuffer
 {
 {
     unsigned indexSize_;
     unsigned indexSize_;
-    Vector<unsigned> indices_;
+    PODVector<unsigned> indices_;
     
     
     ModelIndexBuffer() :
     ModelIndexBuffer() :
         indexSize_(sizeof(unsigned short))
         indexSize_(sizeof(unsigned short))
@@ -218,7 +218,7 @@ struct ModelSubGeometryLodLevel
     unsigned indexStart_;
     unsigned indexStart_;
     unsigned indexCount_;
     unsigned indexCount_;
     Map<unsigned, PODVector<BoneWeightAssignment> > boneWeights_;
     Map<unsigned, PODVector<BoneWeightAssignment> > boneWeights_;
-    Vector<unsigned> boneMapping_;
+    PODVector<unsigned> boneMapping_;
     
     
     ModelSubGeometryLodLevel() : 
     ModelSubGeometryLodLevel() : 
         distance_(0.0f),
         distance_(0.0f),

+ 1 - 1
Tools/ShaderCompiler/ShaderCompiler.cpp

@@ -395,7 +395,7 @@ void Run(const Vector<String>& arguments)
 void CompileVariations(const Shader& baseShader, XMLElement& shaders)
 void CompileVariations(const Shader& baseShader, XMLElement& shaders)
 {
 {
     unsigned combinations = 1;
     unsigned combinations = 1;
-    Vector<unsigned> compiled;
+    PODVector<unsigned> compiled;
     bool hasVariations = false;
     bool hasVariations = false;
     
     
     const Vector<Variation>& variations = baseShader.variations_;
     const Vector<Variation>& variations = baseShader.variations_;