[Bf-blender-cvs] [e52941fe5b3] functions: utility for printing arrays

Jacques Lucke noreply at git.blender.org
Sat Feb 1 11:59:11 CET 2020


Commit: e52941fe5b37fa80586001eb926d391e5d714ec0
Author: Jacques Lucke
Date:   Sat Feb 1 11:34:57 2020 +0100
Branches: functions
https://developer.blender.org/rBe52941fe5b37fa80586001eb926d391e5d714ec0

utility for printing arrays

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

M	source/blender/blenlib/BLI_array_ref.h

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

diff --git a/source/blender/blenlib/BLI_array_ref.h b/source/blender/blenlib/BLI_array_ref.h
index 9944c3231d2..4c96e156aa5 100644
--- a/source/blender/blenlib/BLI_array_ref.h
+++ b/source/blender/blenlib/BLI_array_ref.h
@@ -351,6 +351,11 @@ template<typename T> class ArrayRef {
       std::cout << '\n';
     }
   }
+
+  void print_as_lines(std::string name) const
+  {
+    this->print_as_lines(name, [](const T &value) { std::cout << value; });
+  }
 };
 
 /**



More information about the Bf-blender-cvs mailing list