diff options
Diffstat (limited to 'source/blender')
26 files changed, 124 insertions, 41 deletions
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 optimization, having * a special map with string keys can be quite handy. */ -#pragma once - #include "BLI_map.h" #include "BLI_string_ref.h" #include "BLI_vector.h" @@ -418,3 +419,5 @@ template<typename T, typename Allocator = GuardedAllocator> class StringMap { #undef ITER_SLOTS_END } // namespace BLI + +#endif /* __BLI_STRING_MAP_H__ */ diff --git a/source/blender/blenlib/BLI_string_ref.h b/source/blender/blenlib/BLI_string_ref.h index 9d4678f335f..76163a2754c 100644 --- a/source/blender/blenlib/BLI_string_ref.h +++ b/source/blender/blenlib/BLI_string_ref.h @@ -14,6 +14,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#ifndef __BLI_STRING_REF_H__ +#define __BLI_STRING_REF_H__ + /** \file * \ingroup bli * @@ -25,8 +28,6 @@ * not. */ -#pragma once - #include <cstring> #include <string> #include <sstream> @@ -242,3 +243,5 @@ inline bool StringRefBase::endswith(StringRef suffix) const } } // namespace BLI + +#endif /* __BLI_STRING_REF_H__ */ diff --git a/source/blender/blenlib/BLI_temporary_allocator_cxx.h b/source/blender/blenlib/BLI_temporary_allocator_cxx.h index be898f8c78d..06159f68059 100644 --- a/source/blender/blenlib/BLI_temporary_allocator_cxx.h +++ b/source/blender/blenlib/BLI_temporary_allocator_cxx.h @@ -14,12 +14,13 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#ifndef __BLI_TEMPORARY_ALLOCATOR_CXX_H__ +#define __BLI_TEMPORARY_ALLOCATOR_CXX_H__ + /** \file * \ingroup bli */ -#pragma once - #include "BLI_temporary_allocator.h" namespace BLI { @@ -33,3 +34,5 @@ template<typename T> MutableArrayRef<T> temporary_allocate_array(uint size) } }; // namespace BLI + +#endif /* __BLI_TEMPORARY_ALLOCATOR_CXX_H__ */ diff --git a/source/blender/blenlib/BLI_vector.h b/source/blender/blenlib/BLI_vector.h index 1901f2a60ad..97357ecd384 100644 --- a/source/blender/blenlib/BLI_vector.h +++ b/source/blender/blenlib/BLI_vector.h @@ -14,6 +14,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#ifndef __BLI_VECTOR_H__ +#define __BLI_VECTOR_H__ + /** \file * \ingroup bli * @@ -22,8 +25,6 @@ * performed. Instead, those elements are stored directly in the vector. */ -#pragma once - #include <algorithm> #include <cstdlib> #include <cstring> @@ -599,3 +600,5 @@ template<typename T, uint N = 4, typename Allocator = GuardedAllocator> class Ve template<typename T, uint N = 4> using TemporaryVector = Vector<T, N, TemporaryAllocator>; } /* namespace BLI */ + +#endif /* __BLI_VECTOR_H__ */ diff --git a/source/blender/compositor/nodes/COM_ImageNode.h b/source/blender/compositor/nodes/COM_ImageNode.h index 781fef37355..cde9f997f85 100644 --- a/source/blender/compositor/nodes/COM_ImageNode.h +++ b/source/blender/compositor/nodes/COM_ImageNode.h @@ -16,6 +16,9 @@ * Copyright 2011, Blender Foundation. */ +#ifndef __COM_IMAGENODE_H__ +#define __COM_IMAGENODE_H__ + #include "COM_defines.h" #include "COM_Node.h" #include "DNA_node_types.h" @@ -44,3 +47,5 @@ class ImageNode : public Node { ImageNode(bNode *editorNode); void convertToOperations(NodeConverter &converter, const CompositorContext &context) const; }; + +#endif /* __COM_IMAGENODE_H__ */ diff --git a/source/blender/compositor/nodes/COM_KeyingNode.h b/source/blender/compositor/nodes/COM_KeyingNode.h index 9ae1d04b03f..fc5f55e33ae 100644 --- a/source/blender/compositor/nodes/COM_KeyingNode.h +++ b/source/blender/compositor/nodes/COM_KeyingNode.h @@ -16,6 +16,9 @@ * Copyright 2012, Blender Foundation. */ +#ifndef __COM_KEYINGNODE_H__ +#define __COM_KEYINGNODE_H__ + #include "COM_Node.h" /** @@ -55,3 +58,5 @@ class KeyingNode : public Node { KeyingNode(bNode *editorNode); void convertToOperations(NodeConverter &converter, const CompositorContext &context) const; }; + +#endif /* __COM_KEYINGNODE_H__ */ diff --git a/source/blender/compositor/nodes/COM_KeyingScreenNode.h b/source/blender/compositor/nodes/COM_KeyingScreenNode.h index edaf0238667..12db2ed8889 100644 --- a/source/blender/compositor/nodes/COM_KeyingScreenNode.h +++ b/source/blender/compositor/nodes/COM_KeyingScreenNode.h @@ -16,6 +16,9 @@ * Copyright 2012, Blender Foundation. */ +#ifndef __COM_KEYINGSCREENNODE_H__ +#define __COM_KEYINGSCREENNODE_H__ + #include "COM_Node.h" #include "DNA_node_types.h" @@ -28,3 +31,5 @@ class KeyingScreenNode : public Node { KeyingScreenNode(bNode *editorNode); void convertToOperations(NodeConverter &converter, const CompositorContext &context) const; }; + +#endif /* __COM_KEYINGSCREENNODE_H__ */ diff --git a/source/blender/compositor/nodes/COM_PlaneTrackDeformNode.h b/source/blender/compositor/nodes/COM_PlaneTrackDeformNode.h index 0d57163dc97..6ee73e22af0 100644 --- a/source/blender/compositor/nodes/COM_PlaneTrackDeformNode.h +++ b/source/blender/compositor/nodes/COM_PlaneTrackDeformNode.h @@ -16,6 +16,9 @@ * Copyright 2013, Blender Foundation. */ +#ifndef __COM_PLANETRACKDEFORMNODE_H__ +#define __COM_PLANETRACKDEFORMNODE_H__ + #include "COM_Node.h" extern "C" { @@ -32,3 +35,5 @@ class PlaneTrackDeformNode : public Node { PlaneTrackDeformNode(bNode *editorNode); void convertToOperations(NodeConverter &converter, const CompositorContext &context) const; }; + +#endif /* __COM_PLANETRACKDEFORMNODE_H__ */ diff --git a/source/blender/compositor/nodes/COM_RenderLayersNode.h b/source/blender/compositor/nodes/COM_RenderLayersNode.h index 7e574678f2b..f6822f98fd9 100644 --- a/source/blender/compositor/nodes/COM_RenderLayersNode.h +++ b/source/blender/compositor/nodes/COM_RenderLayersNode.h @@ -16,6 +16,9 @@ * Copyright 2011, Blender Foundation. */ +#ifndef __COM_RENDERLAYERSNODE_H__ +#define __COM_RENDERLAYERSNODE_H__ + #include "COM_Node.h" #include "DNA_node_types.h" #include "COM_RenderLayersProg.h" @@ -46,3 +49,5 @@ class RenderLayersNode : public Node { void missingSocketLink(NodeConverter &converter, NodeOutput *output) const; void missingRenderLink(NodeConverter &converter) const; }; + +#endif /* __COM_RENDERLAYERSNODE_H__ */ diff --git a/source/blender/compositor/nodes/COM_TextureNode.h b/source/blender/compositor/nodes/COM_TextureNode.h index 026d42ce2c3..8fe620a89b3 100644 --- a/source/blender/compositor/nodes/COM_TextureNode.h +++ b/source/blender/compositor/nodes/COM_TextureNode.h @@ -16,6 +16,9 @@ * Copyright 2011, Blender Foundation. */ +#ifndef __COM_TEXTURENODE_H__ +#define __COM_TEXTURENODE_H__ + #include "COM_Node.h" #include "DNA_node_types.h" @@ -28,3 +31,5 @@ class TextureNode : public Node { TextureNode(bNode *editorNode); void convertToOperations(NodeConverter &converter, const CompositorContext &context) const; }; + +#endif /* __COM_TEXTURENODE_H__ */ diff --git a/source/blender/compositor/nodes/COM_TrackPositionNode.h b/source/blender/compositor/nodes/COM_TrackPositionNode.h index c9420764598..7136077a123 100644 --- a/source/blender/compositor/nodes/COM_TrackPositionNode.h +++ b/source/blender/compositor/nodes/COM_TrackPositionNode.h @@ -16,6 +16,9 @@ * Copyright 2012, Blender Foundation. */ +#ifndef __COM_TRACKPOSITIONNODE_H__ +#define __COM_TRACKPOSITIONNODE_H__ + #include "COM_Node.h" #include "DNA_node_types.h" @@ -28,3 +31,5 @@ class TrackPositionNode : public Node { TrackPositionNode(bNode *editorNode); void convertToOperations(NodeConverter &converter, const CompositorContext &context) const; }; + +#endif /* __COM_TRACKPOSITIONNODE_H__ */ diff --git a/source/blender/compositor/operations/COM_DenoiseOperation.h b/source/blender/compositor/operations/COM_DenoiseOperation.h index 73165174932..fc06bb81a97 100644 --- a/source/blender/compositor/operations/COM_DenoiseOperation.h +++ b/source/blender/compositor/operations/COM_DenoiseOperation.h @@ -19,8 +19,8 @@ * Stefan Werner */ -#ifndef __COM_DENOISEBASEOPERATION_H__ -#define __COM_DENOISEBASEOPERATION_H__ +#ifndef __COM_DENOISEOPERATION_H__ +#define __COM_DENOISEOPERATION_H__ #include "COM_SingleThreadedOperation.h" #include "DNA_node_types.h" @@ -68,4 +68,5 @@ class DenoiseOperation : public SingleThreadedOperation { MemoryBuffer *createMemoryBuffer(rcti *rect); }; -#endif + +#endif /* __COM_DENOISEOPERATION_H__ */ diff --git a/source/blender/draw/intern/draw_cache_extract.h b/source/blender/draw/intern/draw_cache_extract.h index 70778ca6014..75b8d820884 100644 --- a/source/blender/draw/intern/draw_cache_extract.h +++ b/source/blender/draw/intern/draw_cache_extract.h @@ -20,8 +20,8 @@ * \ingroup draw */ -#ifndef __DRAW_CACHE_EXTRACT_MESH_H__ -#define __DRAW_CACHE_EXTRACT_MESH_H__ +#ifndef __DRAW_CACHE_EXTRACT_H__ +#define __DRAW_CACHE_EXTRACT_H__ /* Vertex Group Selection and display options */ typedef struct DRW_MeshWeightState { @@ -253,4 +253,4 @@ void mesh_buffer_cache_create_requested(MeshBatchCache *cache, const ToolSettings *ts, const bool use_hide); -#endif /* __DRAW_CACHE_EXTRACT_MESH_H__ */ +#endif /* __DRAW_CACHE_EXTRACT_H__ */ |