Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-09-13 14:12:26 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-09-13 14:12:43 +0300
commitf795bdbf21a9ae7a774137154a9458e15cff6cd8 (patch)
tree5ae2ac380a4a54391cfbfb8be8d18ea96723a52c /source/blender/blenlib
parent9e60e860577f536841a8865cb5328b98895644e3 (diff)
Cleanup: use header guards
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r--source/blender/blenlib/BLI_allocator.h6
-rw-r--r--source/blender/blenlib/BLI_array_cxx.h6
-rw-r--r--source/blender/blenlib/BLI_array_ref.h7
-rw-r--r--source/blender/blenlib/BLI_hash_cxx.h7
-rw-r--r--source/blender/blenlib/BLI_index_range.h7
-rw-r--r--source/blender/blenlib/BLI_listbase_wrapper.h7
-rw-r--r--source/blender/blenlib/BLI_map.h7
-rw-r--r--source/blender/blenlib/BLI_memory_utils_cxx.h7
-rw-r--r--source/blender/blenlib/BLI_open_addressing.h7
-rw-r--r--source/blender/blenlib/BLI_set.h7
-rw-r--r--source/blender/blenlib/BLI_set_vector.h7
-rw-r--r--source/blender/blenlib/BLI_stack_cxx.h7
-rw-r--r--source/blender/blenlib/BLI_string_map.h7
-rw-r--r--source/blender/blenlib/BLI_string_ref.h7
-rw-r--r--source/blender/blenlib/BLI_temporary_allocator_cxx.h7
-rw-r--r--source/blender/blenlib/BLI_vector.h7
16 files changed, 78 insertions, 32 deletions
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__ */