[Bf-blender-cvs] [f795bdbf21a] master: Cleanup: use header guards

Campbell Barton noreply at git.blender.org
Fri Sep 13 13:13:29 CEST 2019


Commit: f795bdbf21a9ae7a774137154a9458e15cff6cd8
Author: Campbell Barton
Date:   Fri Sep 13 21:12:26 2019 +1000
Branches: master
https://developer.blender.org/rBf795bdbf21a9ae7a774137154a9458e15cff6cd8

Cleanup: use header guards

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

M	source/blender/blenkernel/BKE_mesh_remesh_voxel.h
M	source/blender/blenlib/BLI_allocator.h
M	source/blender/blenlib/BLI_array_cxx.h
M	source/blender/blenlib/BLI_array_ref.h
M	source/blender/blenlib/BLI_hash_cxx.h
M	source/blender/blenlib/BLI_index_range.h
M	source/blender/blenlib/BLI_listbase_wrapper.h
M	source/blender/blenlib/BLI_map.h
M	source/blender/blenlib/BLI_memory_utils_cxx.h
M	source/blender/blenlib/BLI_open_addressing.h
M	source/blender/blenlib/BLI_set.h
M	source/blender/blenlib/BLI_set_vector.h
M	source/blender/blenlib/BLI_stack_cxx.h
M	source/blender/blenlib/BLI_string_map.h
M	source/blender/blenlib/BLI_string_ref.h
M	source/blender/blenlib/BLI_temporary_allocator_cxx.h
M	source/blender/blenlib/BLI_vector.h
M	source/blender/compositor/nodes/COM_ImageNode.h
M	source/blender/compositor/nodes/COM_KeyingNode.h
M	source/blender/compositor/nodes/COM_KeyingScreenNode.h
M	source/blender/compositor/nodes/COM_PlaneTrackDeformNode.h
M	source/blender/compositor/nodes/COM_RenderLayersNode.h
M	source/blender/compositor/nodes/COM_TextureNode.h
M	source/blender/compositor/nodes/COM_TrackPositionNode.h
M	source/blender/compositor/operations/COM_DenoiseOperation.h
M	source/blender/draw/intern/draw_cache_extract.h

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

diff --git a/source/blender/blenkernel/BKE_mesh_remesh_voxel.h b/source/blender/blenkernel/BKE_mesh_remesh_voxel.h
index 6b275e11cf7..a1bcd515c17 100644
--- a/source/blender/blenkernel/BKE_mesh_remesh_voxel.h
+++ b/source/blender/blenkernel/BKE_mesh_remesh_voxel.h
@@ -16,8 +16,9 @@
  * The Original Code is Copyright (C) 2019 by Blender Foundation
  * All rights reserved.
  */
-#ifndef __BKE_REMESH_H__
-#define __BKE_REMESH_H__
+
+#ifndef __BKE_MESH_REMESH_VOXEL_H__
+#define __BKE_MESH_REMESH_VOXEL_H__
 
 /** \file
  * \ingroup bke
@@ -51,4 +52,4 @@ struct Mesh *BKE_mesh_remesh_quadriflow_to_mesh_nomain(struct Mesh *mesh,
 /* Data reprojection functions */
 void BKE_remesh_reproject_paint_mask(struct Mesh *target, struct Mesh *source);
 
-#endif /* __BKE_REMESH_H__ */
+#endif /* __BKE_MESH_REMESH_VOXEL_H__ */
diff --git a/source/blender/blenlib/BLI_allocator.h b/source/blender/blenlib/BLI_allocator.h
index fd8c94eee4c..52fa8d2b705 100644
--- a/source/blender/blenlib/BLI_allocator.h
+++ b/source/blender/blenlib/BLI_allocator.h
@@ -13,6 +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__
 
 /** \file
  * \ingroup bli
@@ -27,8 +29,6 @@
  * job good enough.
  */
 
-#pragma once
-
 #include <stdlib.h>
 
 #include "MEM_guardedalloc.h"
@@ -125,3 +125,5 @@ class TemporaryAllocator {
 };
 
 }  // namespace BLI
+
+#endif /* __BLI_ALLOCATOR_H__ */
diff --git a/source/blender/blenlib/BLI_array_cxx.h b/source/blender/blenlib/BLI_array_cxx.h
index f48ba05842e..c7704e20fb1 100644
--- a/source/blender/blenlib/BLI_array_cxx.h
+++ b/source/blender/blenlib/BLI_array_cxx.h
@@ -13,6 +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__
 
 /** \file
  * \ingroup bli
@@ -21,8 +23,6 @@
  * a template argument. Instead it can be specified at the construction time.
  */
 
-#pragma once
-
 #include "BLI_utildefines.h"
 #include "BLI_allocator.h"
 #include "BLI_array_ref.h"
@@ -193,3 +193,5 @@ template<typename T, typename Allocator = GuardedAllocator> class Array {
 template<typename T> using TemporaryArray = Array<T, TemporaryAllocator>;
 
 }  // namespace BLI
+
+#endif /* __BLI_ARRAY_CXX_H__ */
diff --git a/source/blender/blenlib/BLI_array_ref.h b/source/blender/blenlib/BLI_array_ref.h
index a771d1c1329..1373a0da355 100644
--- a/source/blender/blenlib/BLI_array_ref.h
+++ b/source/blender/blenlib/BLI_array_ref.h
@@ -14,6 +14,9 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
+#ifndef __BLI_ARRAY_REF_H__
+#define __BLI_ARRAY_REF_H__
+
 /** \file
  * \ingroup bli
  *
@@ -32,8 +35,6 @@
  * Since array references do not own any memory, it is generally not save to store them.
  */
 
-#pragma once
-
 #include <vector>
 #include <array>
 #include <algorithm>
@@ -421,3 +422,5 @@ template<typename T> ArrayRef<T> ref_c_array(const T *array, uint size)
 }
 
 } /* namespace BLI */
+
+#endif /* __BLI_ARRAY_REF_H__ */
diff --git a/source/blender/blenlib/BLI_hash_cxx.h b/source/blender/blenlib/BLI_hash_cxx.h
index b9a53f29a04..78b8ee20b0c 100644
--- a/source/blender/blenlib/BLI_hash_cxx.h
+++ b/source/blender/blenlib/BLI_hash_cxx.h
@@ -14,6 +14,9 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
+#ifndef __BLI_HASH_CXX_H__
+#define __BLI_HASH_CXX_H__
+
 /** \file
  * \ingroup bli
  *
@@ -21,8 +24,6 @@
  * used by containers such as Map and Set.
  */
 
-#pragma once
-
 #include <functional>
 #include <string>
 #include <utility>
@@ -98,3 +99,5 @@ template<typename T1, typename T2> struct DefaultHash<std::pair<T1, T2>> {
 };
 
 }  // namespace BLI
+
+#endif /* __BLI_HASH_CXX_H__ */
diff --git a/source/blender/blenlib/BLI_index_range.h b/source/blender/blenlib/BLI_index_range.h
index 96c3d22c4e5..a1fed5bd97c 100644
--- a/source/blender/blenlib/BLI_index_range.h
+++ b/source/blender/blenlib/BLI_index_range.h
@@ -14,6 +14,9 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
+#ifndef __BLI_INDEX_RANGE_H__
+#define __BLI_INDEX_RANGE_H__
+
 /** \file
  * \ingroup bli
  *
@@ -22,8 +25,6 @@
  * cases, a separate data structure should be used.
  */
 
-#pragma once
-
 #include <cmath>
 #include <algorithm>
 #include <iostream>
@@ -191,3 +192,5 @@ class IndexRange {
 };
 
 }  // namespace BLI
+
+#endif /* __BLI_INDEX_RANGE_H__ */
diff --git a/source/blender/blenlib/BLI_listbase_wrapper.h b/source/blender/blenlib/BLI_listbase_wrapper.h
index 90755d551b1..34197fe9c45 100644
--- a/source/blender/blenlib/BLI_listbase_wrapper.h
+++ b/source/blender/blenlib/BLI_listbase_wrapper.h
@@ -14,6 +14,9 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
+#ifndef __BLI_LISTBASE_WRAPPER_H__
+#define __BLI_LISTBASE_WRAPPER_H__
+
 /** \file
  * \ingroup bli
  *
@@ -21,8 +24,6 @@
  * instances, that are used in many places in Blender.
  */
 
-#pragma once
-
 #include "BLI_listbase.h"
 #include "DNA_listBase.h"
 
@@ -95,3 +96,5 @@ template<typename T> class IntrusiveListBaseWrapper {
 };
 
 } /* namespace BLI */
+
+#endif /* __BLI_LISTBASE_WRAPPER_H__ */
diff --git a/source/blender/blenlib/BLI_map.h b/source/blender/blenlib/BLI_map.h
index 8ee0624df19..a5358304c77 100644
--- a/source/blender/blenlib/BLI_map.h
+++ b/source/blender/blenlib/BLI_map.h
@@ -14,6 +14,9 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
+#ifndef __BLI_MAP_H__
+#define __BLI_MAP_H__
+
 /** \file
  * \ingroup bli
  *
@@ -23,8 +26,6 @@
  * lookups. Keys and values are stored in groups of four to avoid wasting memory due to padding.
  */
 
-#pragma once
-
 #include "BLI_hash_cxx.h"
 #include "BLI_array_ref.h"
 #include "BLI_open_addressing.h"
@@ -619,3 +620,5 @@ template<typename KeyT, typename ValueT, typename Allocator = GuardedAllocator>
 #undef ITER_SLOTS_END
 
 }  // namespace BLI
+
+#endif /* __BLI_MAP_H__ */
diff --git a/source/blender/blenlib/BLI_memory_utils_cxx.h b/source/blender/blenlib/BLI_memory_utils_cxx.h
index 7bfc885b7f6..22f333c6303 100644
--- a/source/blender/blenlib/BLI_memory_utils_cxx.h
+++ b/source/blender/blenlib/BLI_memory_utils_cxx.h
@@ -14,12 +14,13 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
+#ifndef __BLI_MEMORY_UTILS_CXX_H__
+#define __BLI_MEMORY_UTILS_CXX_H__
+
 /** \file
  * \ingroup bli
  */
 
-#pragma once
-
 #include <memory>
 #include <algorithm>
 
@@ -79,3 +80,5 @@ template<typename T> void relocate_n(T *src, uint n, T *dst)
 }
 
 }  // namespace BLI
+
+#endif /* __BLI_MEMORY_UTILS_CXX_H__ */
diff --git a/source/blender/blenlib/BLI_open_addressing.h b/source/blender/blenlib/BLI_open_addressing.h
index 32e89c19139..8ca5156a952 100644
--- a/source/blender/blenlib/BLI_open_addressing.h
+++ b/source/blender/blenlib/BLI_open_addressing.h
@@ -14,6 +14,9 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
+#ifndef __BLI_OPEN_ADDRESSING_H__
+#define __BLI_OPEN_ADDRESSING_H__
+
 /** \file
  * \ingroup bli
  *
@@ -28,8 +31,6 @@
  * actual hash table implementation.
  */
 
-#pragma once
-
 #include <cmath>
 
 #include "BLI_utildefines.h"
@@ -300,3 +301,5 @@ class OpenAddressingArray {
 };
 
 }  // namespace BLI
+
+#endif /* __BLI_OPEN_ADDRESSING_H__ */
diff --git a/source/blender/blenlib/BLI_set.h b/source/blender/blenlib/BLI_set.h
index 33b02badf48..feb0574338e 100644
--- a/source/blender/blenlib/BLI_set.h
+++ b/source/blender/blenlib/BLI_set.h
@@ -14,14 +14,15 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
+#ifndef __BLI_SET_H__
+#define __BLI_SET_H__
+
 /** \file
  * \ingroup bli
  *
  * This file provides a set implementation that uses open addressing with probing.
  */
 
-#pragma once
-
 #include "BLI_hash_cxx.h"
 #include "BLI_open_addressing.h"
 #include "BLI_vector.h"
@@ -468,3 +469,5 @@ template<typename T, typename Allocator = GuardedAllocator> class Set {
 #undef ITER_SLOTS_END
 
 }  // namespace BLI
+
+#endif /* __BLI_SET_H__ */
diff --git a/source/blender/blenlib/BLI_set_vector.h b/source/blender/blenlib/BLI_set_vector.h
index 36e69e7e3cc..c0b99d568cc 100644
--- a/source/blender/blenlib/BLI_set_vector.h
+++ b/source/blender/blenlib/BLI_set_vector.h
@@ -14,6 +14,9 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
+#ifndef __BLI_SET_VECTOR_H__
+#define __BLI_SET_VECTOR_H__
+
 /** \file
  * \ingroup bli
  *
@@ -22,8 +25,6 @@
  * there are no deletes. The expected time to check if a value is in the SetVector is O(1).
  */
 
-#pragma once
-
 #include "BLI_hash_cxx.h"
 #include "BLI_open_addressing.h"
 #include "BLI_vector.h"
@@ -374,3 +375,5 @@ template<typename T, typename Allocator = GuardedAllocator> class SetVector {
 #undef ITER_SLOTS_END
 
 }  // namespace BLI
+
+#endif /* __BLI_SET_VECTOR_H__ */
diff --git a/source/blender/blenlib/BLI_stack_cxx.h b/source/blender/blenlib/BLI_stack_cxx.h
index 095f98608b7..4c9f2ed7d44 100644
--- a/source/blender/blenlib/BLI_stack_cxx.h
+++ b/source/blender/blenlib/BLI_stack_cxx.h
@@ -14,14 +14,15 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
+#ifndef __BLI_STACK_CXX_H__
+#define __BLI_STACK_CXX_H__
+
 /** \file
  * \ingroup bli
  *
  * Basic stack implementation with support for small object optimization.
  */
 
-#pragma once
-
 #include "BLI_vector.h"
 
 namespace BLI {
@@ -140,3 +141,5 @@ template<typename T, uint N = 4, typename Allocator = GuardedAllocator> class St
 };
 
 } /* namespace BLI */
+
+#endif /* __BLI_STACK_CXX_H__ */
diff --git a/source/blender/blenlib/BLI_string_map.h b/source/blender/blenlib/BLI_string_map.h
index e7eb1e2635e..2daf192f0a7 100644
--- a/source/blender/blenlib/BLI_string_map.h
+++ b/source/blender/blenlib/BLI_string_map.h
@@ -14,6 +14,9 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
+#ifndef __BLI_STRING_MAP_H__
+#define __BLI_STRING_MAP_H__
+
 /** \file
  * \ingroup bli
  *
@@ -24,8 +27,6 @@
  * make it more efficient later on. Also, even if we will never implement this

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list