[Bf-blender-cvs] [3059353b38e] master: BLI: Use .hh extension for C++ headers in blenlib

Jacques Lucke noreply at git.blender.org
Tue Apr 21 17:34:10 CEST 2020


Commit: 3059353b38ed1fc432cce584afad5bef3b7f2227
Author: Jacques Lucke
Date:   Tue Apr 21 17:31:56 2020 +0200
Branches: master
https://developer.blender.org/rB3059353b38ed1fc432cce584afad5bef3b7f2227

BLI: Use .hh extension for C++ headers in blenlib

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

R097	source/blender/blenlib/BLI_allocator.h	source/blender/blenlib/BLI_allocator.hh
R095	source/blender/blenlib/BLI_array_cxx.h	source/blender/blenlib/BLI_array.hh
R098	source/blender/blenlib/BLI_array_ref.h	source/blender/blenlib/BLI_array_ref.hh
R097	source/blender/blenlib/BLI_hash_cxx.h	source/blender/blenlib/BLI_hash.hh
R097	source/blender/blenlib/BLI_index_range.h	source/blender/blenlib/BLI_index_range.hh
R095	source/blender/blenlib/BLI_listbase_wrapper.h	source/blender/blenlib/BLI_listbase_wrapper.hh
R099	source/blender/blenlib/BLI_map.h	source/blender/blenlib/BLI_map.hh
R096	source/blender/blenlib/BLI_memory_utils_cxx.h	source/blender/blenlib/BLI_memory_utils.hh
R097	source/blender/blenlib/BLI_open_addressing.h	source/blender/blenlib/BLI_open_addressing.hh
R096	source/blender/blenlib/BLI_optional.h	source/blender/blenlib/BLI_optional.hh
R098	source/blender/blenlib/BLI_set.h	source/blender/blenlib/BLI_set.hh
R096	source/blender/blenlib/BLI_stack_cxx.h	source/blender/blenlib/BLI_stack.hh
R098	source/blender/blenlib/BLI_string_map.h	source/blender/blenlib/BLI_string_map.hh
R097	source/blender/blenlib/BLI_string_ref.h	source/blender/blenlib/BLI_string_ref.hh
R093	source/blender/blenlib/BLI_utility_mixins.h	source/blender/blenlib/BLI_utility_mixins.hh
R098	source/blender/blenlib/BLI_vector.h	source/blender/blenlib/BLI_vector.hh
R098	source/blender/blenlib/BLI_vector_set.h	source/blender/blenlib/BLI_vector_set.hh
M	source/blender/blenlib/CMakeLists.txt
M	source/blender/blenlib/intern/BLI_index_range.cc
M	source/blender/modifiers/intern/MOD_mask.cc
M	tests/gtests/blenlib/BLI_array_ref_test.cc
M	tests/gtests/blenlib/BLI_array_test.cc
M	tests/gtests/blenlib/BLI_index_range_test.cc
M	tests/gtests/blenlib/BLI_map_test.cc
M	tests/gtests/blenlib/BLI_optional_test.cc
M	tests/gtests/blenlib/BLI_set_test.cc
M	tests/gtests/blenlib/BLI_stack_cxx_test.cc
M	tests/gtests/blenlib/BLI_string_map_test.cc
M	tests/gtests/blenlib/BLI_string_ref_test.cc
M	tests/gtests/blenlib/BLI_vector_set_test.cc
M	tests/gtests/blenlib/BLI_vector_test.cc

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

diff --git a/source/blender/blenlib/BLI_allocator.h b/source/blender/blenlib/BLI_allocator.hh
similarity index 97%
rename from source/blender/blenlib/BLI_allocator.h
rename to source/blender/blenlib/BLI_allocator.hh
index e2d39c4e897..c52db4aab53 100644
--- a/source/blender/blenlib/BLI_allocator.h
+++ b/source/blender/blenlib/BLI_allocator.hh
@@ -13,8 +13,8 @@
  * along with this program; if not, write to the Free Software Foundation,
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  */
-#ifndef __BLI_ALLOCATOR_H__
-#define __BLI_ALLOCATOR_H__
+#ifndef __BLI_ALLOCATOR_HH__
+#define __BLI_ALLOCATOR_HH__
 
 /** \file
  * \ingroup bli
@@ -102,4 +102,4 @@ class RawAllocator {
 
 }  // namespace BLI
 
-#endif /* __BLI_ALLOCATOR_H__ */
+#endif /* __BLI_ALLOCATOR_HH__ */
diff --git a/source/blender/blenlib/BLI_array_cxx.h b/source/blender/blenlib/BLI_array.hh
similarity index 95%
rename from source/blender/blenlib/BLI_array_cxx.h
rename to source/blender/blenlib/BLI_array.hh
index 8fc2aec6698..c6536f6c1ed 100644
--- a/source/blender/blenlib/BLI_array_cxx.h
+++ b/source/blender/blenlib/BLI_array.hh
@@ -13,8 +13,8 @@
  * along with this program; if not, write to the Free Software Foundation,
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  */
-#ifndef __BLI_ARRAY_CXX_H__
-#define __BLI_ARRAY_CXX_H__
+#ifndef __BLI_ARRAY_HH__
+#define __BLI_ARRAY_HH__
 
 /** \file
  * \ingroup bli
@@ -23,10 +23,10 @@
  * a template argument. Instead it can be specified at the construction time.
  */
 
-#include "BLI_allocator.h"
-#include "BLI_array_ref.h"
-#include "BLI_index_range.h"
-#include "BLI_memory_utils_cxx.h"
+#include "BLI_allocator.hh"
+#include "BLI_array_ref.hh"
+#include "BLI_index_range.hh"
+#include "BLI_memory_utils.hh"
 #include "BLI_utildefines.h"
 
 namespace BLI {
@@ -231,4 +231,4 @@ template<typename T, uint N = 4, typename Allocator = GuardedAllocator> class Ar
 
 }  // namespace BLI
 
-#endif /* __BLI_ARRAY_CXX_H__ */
+#endif /* __BLI_ARRAY_HH__ */
diff --git a/source/blender/blenlib/BLI_array_ref.h b/source/blender/blenlib/BLI_array_ref.hh
similarity index 98%
rename from source/blender/blenlib/BLI_array_ref.h
rename to source/blender/blenlib/BLI_array_ref.hh
index 2c2e441a47d..dd9421d289c 100644
--- a/source/blender/blenlib/BLI_array_ref.h
+++ b/source/blender/blenlib/BLI_array_ref.hh
@@ -14,8 +14,8 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
-#ifndef __BLI_ARRAY_REF_H__
-#define __BLI_ARRAY_REF_H__
+#ifndef __BLI_ARRAY_REF_HH__
+#define __BLI_ARRAY_REF_HH__
 
 /** \file
  * \ingroup bli
@@ -41,8 +41,8 @@
 #include <string>
 #include <vector>
 
-#include "BLI_index_range.h"
-#include "BLI_memory_utils_cxx.h"
+#include "BLI_index_range.hh"
+#include "BLI_memory_utils.hh"
 #include "BLI_utildefines.h"
 
 namespace BLI {
@@ -542,4 +542,4 @@ void assert_same_size(const T1 &v1, const T2 &v2, const T3 &v3)
 
 } /* namespace BLI */
 
-#endif /* __BLI_ARRAY_REF_H__ */
+#endif /* __BLI_ARRAY_REF_HH__ */
diff --git a/source/blender/blenlib/BLI_hash_cxx.h b/source/blender/blenlib/BLI_hash.hh
similarity index 97%
rename from source/blender/blenlib/BLI_hash_cxx.h
rename to source/blender/blenlib/BLI_hash.hh
index 22941a792ba..b5041012189 100644
--- a/source/blender/blenlib/BLI_hash_cxx.h
+++ b/source/blender/blenlib/BLI_hash.hh
@@ -14,8 +14,8 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
-#ifndef __BLI_HASH_CXX_H__
-#define __BLI_HASH_CXX_H__
+#ifndef __BLI_HASH_HH__
+#define __BLI_HASH_HH__
 
 /** \file
  * \ingroup bli
@@ -109,4 +109,4 @@ template<typename T1, typename T2> struct DefaultHash<std::pair<T1, T2>> {
 
 }  // namespace BLI
 
-#endif /* __BLI_HASH_CXX_H__ */
+#endif /* __BLI_HASH_HH__ */
diff --git a/source/blender/blenlib/BLI_index_range.h b/source/blender/blenlib/BLI_index_range.hh
similarity index 97%
rename from source/blender/blenlib/BLI_index_range.h
rename to source/blender/blenlib/BLI_index_range.hh
index 4553c996454..e24fd567810 100644
--- a/source/blender/blenlib/BLI_index_range.h
+++ b/source/blender/blenlib/BLI_index_range.hh
@@ -14,8 +14,8 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
-#ifndef __BLI_INDEX_RANGE_H__
-#define __BLI_INDEX_RANGE_H__
+#ifndef __BLI_INDEX_RANGE_HH__
+#define __BLI_INDEX_RANGE_HH__
 
 /** \file
  * \ingroup bli
@@ -208,4 +208,4 @@ class IndexRange {
 
 }  // namespace BLI
 
-#endif /* __BLI_INDEX_RANGE_H__ */
+#endif /* __BLI_INDEX_RANGE_HH__ */
diff --git a/source/blender/blenlib/BLI_listbase_wrapper.h b/source/blender/blenlib/BLI_listbase_wrapper.hh
similarity index 95%
rename from source/blender/blenlib/BLI_listbase_wrapper.h
rename to source/blender/blenlib/BLI_listbase_wrapper.hh
index d6832166e35..0eee00c87b9 100644
--- a/source/blender/blenlib/BLI_listbase_wrapper.h
+++ b/source/blender/blenlib/BLI_listbase_wrapper.hh
@@ -14,8 +14,8 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
-#ifndef __BLI_LISTBASE_WRAPPER_H__
-#define __BLI_LISTBASE_WRAPPER_H__
+#ifndef __BLI_LISTBASE_WRAPPER_HH__
+#define __BLI_LISTBASE_WRAPPER_HH__
 
 /** \file
  * \ingroup bli
@@ -110,4 +110,4 @@ template<typename T> class IntrusiveListBaseWrapper {
 
 } /* namespace BLI */
 
-#endif /* __BLI_LISTBASE_WRAPPER_H__ */
+#endif /* __BLI_LISTBASE_WRAPPER_HH__ */
diff --git a/source/blender/blenlib/BLI_map.h b/source/blender/blenlib/BLI_map.hh
similarity index 99%
rename from source/blender/blenlib/BLI_map.h
rename to source/blender/blenlib/BLI_map.hh
index 4b7ac0791d9..626c971c959 100644
--- a/source/blender/blenlib/BLI_map.h
+++ b/source/blender/blenlib/BLI_map.hh
@@ -14,8 +14,8 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
-#ifndef __BLI_MAP_H__
-#define __BLI_MAP_H__
+#ifndef __BLI_MAP_HH__
+#define __BLI_MAP_HH__
 
 /** \file
  * \ingroup bli
@@ -26,9 +26,9 @@
  * lookups. Keys and values are stored in groups of four to avoid wasting memory due to padding.
  */
 
-#include "BLI_array_ref.h"
-#include "BLI_hash_cxx.h"
-#include "BLI_open_addressing.h"
+#include "BLI_array_ref.hh"
+#include "BLI_hash.hh"
+#include "BLI_open_addressing.hh"
 
 namespace BLI {
 
@@ -733,4 +733,4 @@ template<typename KeyT, typename ValueT, typename Allocator = GuardedAllocator>
 
 }  // namespace BLI
 
-#endif /* __BLI_MAP_H__ */
+#endif /* __BLI_MAP_HH__ */
diff --git a/source/blender/blenlib/BLI_memory_utils_cxx.h b/source/blender/blenlib/BLI_memory_utils.hh
similarity index 96%
rename from source/blender/blenlib/BLI_memory_utils_cxx.h
rename to source/blender/blenlib/BLI_memory_utils.hh
index 6534138315d..d9acf08a43f 100644
--- a/source/blender/blenlib/BLI_memory_utils_cxx.h
+++ b/source/blender/blenlib/BLI_memory_utils.hh
@@ -14,8 +14,8 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
-#ifndef __BLI_MEMORY_UTILS_CXX_H__
-#define __BLI_MEMORY_UTILS_CXX_H__
+#ifndef __BLI_MEMORY_UTILS_HH__
+#define __BLI_MEMORY_UTILS_HH__
 
 /** \file
  * \ingroup bli
@@ -120,4 +120,4 @@ template<uint Size, uint Alignment> class alignas(Alignment) AlignedBuffer {
 
 }  // namespace BLI
 
-#endif /* __BLI_MEMORY_UTILS_CXX_H__ */
+#endif /* __BLI_MEMORY_UTILS_HH__ */
diff --git a/source/blender/blenlib/BLI_open_addressing.h b/source/blender/blenlib/BLI_open_addressing.hh
similarity index 97%
rename from source/blender/blenlib/BLI_open_addressing.h
rename to source/blender/blenlib/BLI_open_addressing.hh
index 6a0acd418eb..fa2ea6d8f94 100644
--- a/source/blender/blenlib/BLI_open_addressing.h
+++ b/source/blender/blenlib/BLI_open_addressing.hh
@@ -14,8 +14,8 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
-#ifndef __BLI_OPEN_ADDRESSING_H__
-#define __BLI_OPEN_ADDRESSING_H__
+#ifndef __BLI_OPEN_ADDRESSING_HH__
+#define __BLI_OPEN_ADDRESSING_HH__
 
 /** \file
  * \ingroup bli
@@ -33,9 +33,9 @@
 
 #include <cmath>
 
-#include "BLI_allocator.h"
+#include "BLI_allocator.hh"
 #include "BLI_math_base.h"
-#include "BLI_memory_utils_cxx.h"
+#include "BLI_memory_utils.hh"
 #include "BLI_utildefines.h"
 
 namespace BLI {
@@ -302,4 +302,4 @@ class OpenAddressingArray {
 
 }  // namespace BLI
 
-#endif /* __BLI_OPEN_ADDRESSING_H__ */
+#endif /* __BLI_OPEN_ADDRESSING_HH__ */
diff --git a/source/blender/blenlib/BLI_optional.h b/source/blender/blenlib/BLI_optional.hh
similarity index 96%
rename from source/blender/blenlib/BLI_optional.h
rename to source/blender/blenlib/BLI_optional.hh
index 267c858e0f2..eac11293781 100644
--- a/source/blender/blenlib/BLI_optional.h
+++ b/source/blender/blenlib/BLI_optional.hh
@@ -20,10 +20,10 @@
  * Simple version of std::optional, which is only available since C++17.
  */
 
-#ifndef __BLI_OPTIONAL_H__
-#define __BLI_OPTIONAL_H__
+#ifndef __BLI_OPTIONAL_HH__
+#define __BLI_OPTIONAL_HH__
 
-#include "BLI_memory_utils_cxx.h"
+#include "BLI_memory_utils.hh"
 #include "BLI_utildefines.h"
 
 #include <algorithm>
@@ -196,4 +196,4 @@ template<typename T> class Optional {
 
 } /* namespace BLI */
 
-#endif /* __BLI_OPTIONAL_H__ */
+#endif /* __BLI_OPTIONAL_HH__ */
diff --git a/source/blender/blenlib/BLI_set.h b/source/blender/blenlib/BLI_set.hh
similarity index 98%
rename from source/blender/blenlib/BLI_set.h
rename to source/blender/blenlib/BLI_set.hh
index dc101add1a7..2ef92bf1c48 100644
--- a/source/blender/blenlib/BLI_set.h
+++ b/source/blender/blenlib/BLI_set.hh
@@ -14,8 +14,8 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
-#ifndef __BLI_SET_H__
-#define __BLI_SET_H__
+#ifndef __BLI_SET_HH__
+#define __BLI_SET_HH__
 
 /** \file
  * \ingroup bli
@@ -23,9 +23,9 @@
  * This file provides a set implementation that uses open addressing with probing.
  */
 
-#include "BLI_hash_cxx.h"
-#include "BLI_open_addressing.h"
-#include "BLI_vector.h"
+#include "BLI_hash.hh"
+#include "BLI_open_addressing.hh"
+#include "BLI_vector.hh"
 
 namespace BLI {
 
@@ -480,4 +480,4 @@ template<typename T, typename Allocator = GuardedAllocator> class Set {
 
 }  // namespace BLI
 
-#endif /* __BLI_SET_H__ */
+#endif /* __BLI_SET_HH__ */
diff --git a/source/blender/blenlib/BLI_stack_cxx.h b/source/blender/blenlib/BLI_stack.hh
similarity index 96%
rename from sour

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list