[Bf-blender-cvs] [5ea27e3d141] functions: cleanup SmallVector

Jacques Lucke noreply at git.blender.org
Tue May 28 15:22:19 CEST 2019


Commit: 5ea27e3d141ffe447b9f07d492d689d1a501f385
Author: Jacques Lucke
Date:   Tue May 28 15:14:20 2019 +0200
Branches: functions
https://developer.blender.org/rB5ea27e3d141ffe447b9f07d492d689d1a501f385

cleanup SmallVector

===================================================================

M	source/blender/blenlib/BLI_small_vector.hpp

===================================================================

diff --git a/source/blender/blenlib/BLI_small_vector.hpp b/source/blender/blenlib/BLI_small_vector.hpp
index 08cbe2f0f27..9336f564e6f 100644
--- a/source/blender/blenlib/BLI_small_vector.hpp
+++ b/source/blender/blenlib/BLI_small_vector.hpp
@@ -7,14 +7,14 @@
  * the vector.
  */
 
-#include "BLI_utildefines.h"
-
-#include "MEM_guardedalloc.h"
+#include <algorithm>
 #include <cstdlib>
 #include <cstring>
-#include <memory>
 #include <iostream>
-#include <algorithm>
+#include <memory>
+
+#include "BLI_utildefines.h"
+#include "MEM_guardedalloc.h"
 
 namespace BLI {
 
@@ -64,7 +64,7 @@ template<typename T, uint N = 4> class SmallVector {
 
   SmallVector(SmallVector &&other)
   {
-    this->steal_from_other(std::forward<SmallVector>(other));
+    this->steal_from_other(other);
   }
 
   ~SmallVector()
@@ -91,7 +91,7 @@ template<typename T, uint N = 4> class SmallVector {
     }
 
     this->destruct_elements_and_free_memory();
-    this->steal_from_other(std::forward<SmallVector>(other));
+    this->steal_from_other(other);
 
     return *this;
   }
@@ -298,7 +298,7 @@ template<typename T, uint N = 4> class SmallVector {
     m_size = other.m_size;
   }
 
-  void steal_from_other(SmallVector &&other)
+  void steal_from_other(SmallVector &other)
   {
     if (other.is_small()) {
       uninitialized_relocate_n(other.begin(), other.size(), this->small_buffer());



More information about the Bf-blender-cvs mailing list