Переглянути джерело

ImVector: Fixed a oddly unqualified return type in the assignment operator (I assume C++ handles it nicely as this never warned anywhere, but it is completely unintentional).

omar 7 роки тому
батько
коміт
781a7950d7
1 змінених файлів з 1 додано та 1 видалено
  1. 1 1
      imgui.h

+ 1 - 1
imgui.h

@@ -1255,7 +1255,7 @@ public:
     inline ImVector()           { Size = Capacity = 0; Data = NULL; }
     inline ~ImVector()          { if (Data) ImGui::MemFree(Data); }
     inline ImVector(const ImVector<T>& src)                     { Size = Capacity = 0; Data = NULL; operator=(src); }
-    inline ImVector& operator=(const ImVector<T>& src)          { clear(); resize(src.Size); memcpy(Data, src.Data, (size_t)Size * sizeof(value_type)); return *this; }
+    inline ImVector<T>& operator=(const ImVector<T>& src)       { clear(); resize(src.Size); memcpy(Data, src.Data, (size_t)Size * sizeof(value_type)); return *this; }
 
     inline bool                 empty() const                   { return Size == 0; }
     inline int                  size() const                    { return Size; }