Parcourir la source

WriteDrawablesToOBJ: pass vector as reference

1vanK il y a 5 ans
Parent
commit
ec060153db
2 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 1 1
      Source/Urho3D/Graphics/Drawable.cpp
  2. 1 1
      Source/Urho3D/Graphics/Drawable.h

+ 1 - 1
Source/Urho3D/Graphics/Drawable.cpp

@@ -419,7 +419,7 @@ void Drawable::RemoveFromOctree()
     }
 }
 
-bool WriteDrawablesToOBJ(PODVector<Drawable*> drawables, File* outputFile, bool asZUp, bool asRightHanded, bool writeLightmapUV)
+bool WriteDrawablesToOBJ(const PODVector<Drawable*>& drawables, File* outputFile, bool asZUp, bool asRightHanded, bool writeLightmapUV)
 {
     // Must track indices independently to deal with potential mismatching of drawables vertex attributes (ie. one with UV, another without, then another with)
     unsigned currentPositionIndex = 1;

+ 1 - 1
Source/Urho3D/Graphics/Drawable.h

@@ -394,6 +394,6 @@ inline bool CompareDrawables(Drawable* lhs, Drawable* rhs)
     return lhs->GetSortValue() < rhs->GetSortValue();
 }
 
-URHO3D_API bool WriteDrawablesToOBJ(PODVector<Drawable*> drawables, File* outputFile, bool asZUp, bool asRightHanded, bool writeLightmapUV = false);
+URHO3D_API bool WriteDrawablesToOBJ(const PODVector<Drawable*>& drawables, File* outputFile, bool asZUp, bool asRightHanded, bool writeLightmapUV = false);
 
 }