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

This commit is contained in:
Jacques Lucke 2020-04-21 17:31:56 +02:00
parent 0e52b91f97
commit 3059353b38
31 changed files with 121 additions and 121 deletions

@ -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__ */

@ -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__ */

@ -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__ */

@ -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__ */

@ -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__ */

@ -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__ */

@ -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__ */

@ -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__ */

@ -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__ */

@ -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__ */

@ -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__ */

@ -14,8 +14,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef __BLI_STACK_CXX_H__
#define __BLI_STACK_CXX_H__
#ifndef __BLI_STACK_HH__
#define __BLI_STACK_HH__
/** \file
* \ingroup bli
@ -23,7 +23,7 @@
* Basic stack implementation with support for small object optimization.
*/
#include "BLI_vector.h"
#include "BLI_vector.hh"
namespace BLI {
@ -147,4 +147,4 @@ template<typename T, uint N = 4, typename Allocator = GuardedAllocator> class St
} /* namespace BLI */
#endif /* __BLI_STACK_CXX_H__ */
#endif /* __BLI_STACK_HH__ */

@ -14,8 +14,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef __BLI_STRING_MAP_H__
#define __BLI_STRING_MAP_H__
#ifndef __BLI_STRING_MAP_HH__
#define __BLI_STRING_MAP_HH__
/** \file
* \ingroup bli
@ -27,10 +27,10 @@
* 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. */
#include "BLI_map.h"
#include "BLI_optional.h"
#include "BLI_string_ref.h"
#include "BLI_vector.h"
#include "BLI_map.hh"
#include "BLI_optional.hh"
#include "BLI_string_ref.hh"
#include "BLI_vector.hh"
namespace BLI {
@ -457,4 +457,4 @@ template<typename T, typename Allocator = GuardedAllocator> class StringMap {
} // namespace BLI
#endif /* __BLI_STRING_MAP_H__ */
#endif /* __BLI_STRING_MAP_HH__ */

@ -14,8 +14,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef __BLI_STRING_REF_H__
#define __BLI_STRING_REF_H__
#ifndef __BLI_STRING_REF_HH__
#define __BLI_STRING_REF_HH__
/** \file
* \ingroup bli
@ -32,7 +32,7 @@
#include <sstream>
#include <string>
#include "BLI_array_ref.h"
#include "BLI_array_ref.hh"
#include "BLI_utildefines.h"
namespace BLI {
@ -252,4 +252,4 @@ inline StringRef StringRefBase::substr(uint start, uint size) const
} // namespace BLI
#endif /* __BLI_STRING_REF_H__ */
#endif /* __BLI_STRING_REF_HH__ */

@ -18,8 +18,8 @@
* \ingroup bli
*/
#ifndef __BLI_UTILITY_MIXINS_H__
#define __BLI_UTILITY_MIXINS_H__
#ifndef __BLI_UTILITY_MIXINS_HH__
#define __BLI_UTILITY_MIXINS_HH__
namespace BLI {
@ -49,4 +49,4 @@ class NonMovable {
} // namespace BLI
#endif /* __BLI_UTILITY_MIXINS_H__ */
#endif /* __BLI_UTILITY_MIXINS_HH__ */

@ -14,8 +14,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef __BLI_VECTOR_H__
#define __BLI_VECTOR_H__
#ifndef __BLI_VECTOR_HH__
#define __BLI_VECTOR_HH__
/** \file
* \ingroup bli
@ -31,12 +31,12 @@
#include <iostream>
#include <memory>
#include "BLI_allocator.h"
#include "BLI_array_ref.h"
#include "BLI_index_range.h"
#include "BLI_listbase_wrapper.h"
#include "BLI_allocator.hh"
#include "BLI_array_ref.hh"
#include "BLI_index_range.hh"
#include "BLI_listbase_wrapper.hh"
#include "BLI_math_base.h"
#include "BLI_memory_utils_cxx.h"
#include "BLI_memory_utils.hh"
#include "BLI_utildefines.h"
#include "MEM_guardedalloc.h"
@ -665,4 +665,4 @@ template<typename T, uint N = 20> using ScopedVector = Vector<T, N, GuardedAlloc
} /* namespace BLI */
#endif /* __BLI_VECTOR_H__ */
#endif /* __BLI_VECTOR_HH__ */

@ -14,8 +14,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef __BLI_VECTOR_SET_H__
#define __BLI_VECTOR_SET_H__
#ifndef __BLI_VECTOR_SET_HH__
#define __BLI_VECTOR_SET_HH__
/** \file
* \ingroup bli
@ -25,9 +25,9 @@
* no deletes. The expected time to check if a value is in the VectorSet is O(1).
*/
#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 {
@ -422,4 +422,4 @@ template<typename T, typename Allocator = GuardedAllocator> class VectorSet {
} // namespace BLI
#endif /* __BLI_VECTOR_SET_H__ */
#endif /* __BLI_VECTOR_SET_HH__ */

@ -136,11 +136,11 @@ set(SRC
BLI_alloca.h
BLI_allocator.h
BLI_allocator.hh
BLI_args.h
BLI_array.h
BLI_array_cxx.h
BLI_array_ref.h
BLI_array.hh
BLI_array_ref.hh
BLI_array_store.h
BLI_array_store_utils.h
BLI_array_utils.h
@ -176,13 +176,13 @@ set(SRC
BLI_ghash.h
BLI_gsqueue.h
BLI_hash.h
BLI_hash_cxx.h
BLI_hash.hh
BLI_hash_md5.h
BLI_hash_mm2a.h
BLI_hash_mm3.h
BLI_heap.h
BLI_heap_simple.h
BLI_index_range.h
BLI_index_range.hh
BLI_iterator.h
BLI_jitter_2d.h
BLI_kdopbvh.h
@ -194,8 +194,8 @@ set(SRC
BLI_linklist_lockfree.h
BLI_linklist_stack.h
BLI_listbase.h
BLI_listbase_wrapper.h
BLI_map.h
BLI_listbase_wrapper.hh
BLI_map.hh
BLI_math.h
BLI_math_base.h
BLI_math_bits.h
@ -213,11 +213,11 @@ set(SRC
BLI_memblock.h
BLI_memiter.h
BLI_memory_utils.h
BLI_memory_utils_cxx.h
BLI_memory_utils.hh
BLI_mempool.h
BLI_noise.h
BLI_open_addressing.h
BLI_optional.h
BLI_open_addressing.hh
BLI_optional.hh
BLI_path_util.h
BLI_polyfill_2d.h
BLI_polyfill_2d_beautify.h
@ -225,17 +225,17 @@ set(SRC
BLI_rand.h
BLI_rect.h
BLI_scanfill.h
BLI_set.h
BLI_set.hh
BLI_smallhash.h
BLI_sort.h
BLI_sort_utils.h
BLI_stack.h
BLI_stack_cxx.h
BLI_stack.hh
BLI_strict_flags.h
BLI_string.h
BLI_string_cursor_utf8.h
BLI_string_map.h
BLI_string_ref.h
BLI_string_map.hh
BLI_string_ref.hh
BLI_string_utf8.h
BLI_string_utils.h
BLI_sys_types.h
@ -248,10 +248,10 @@ set(SRC
BLI_utildefines_iter.h
BLI_utildefines_stack.h
BLI_utildefines_variadic.h
BLI_utility_mixins.h
BLI_utility_mixins.hh
BLI_uvproject.h
BLI_vector.h
BLI_vector_set.h
BLI_vector.hh
BLI_vector_set.hh
BLI_vfontdata.h
BLI_voronoi_2d.h
BLI_voxel.h

@ -17,10 +17,10 @@
#include <atomic>
#include <mutex>
#include "BLI_array_cxx.h"
#include "BLI_array_ref.h"
#include "BLI_index_range.h"
#include "BLI_vector.h"
#include "BLI_array.hh"
#include "BLI_array_ref.hh"
#include "BLI_index_range.hh"
#include "BLI_vector.hh"
namespace BLI {

@ -46,9 +46,9 @@
#include "MOD_modifiertypes.h"
#include "BLI_array_cxx.h"
#include "BLI_listbase_wrapper.h"
#include "BLI_vector.h"
#include "BLI_array.hh"
#include "BLI_listbase_wrapper.hh"
#include "BLI_vector.hh"
using BLI::Array;
using BLI::ArrayRef;

@ -1,5 +1,5 @@
#include "BLI_array_ref.h"
#include "BLI_vector.h"
#include "BLI_array_ref.hh"
#include "BLI_vector.hh"
#include "testing/testing.h"
using namespace BLI;

@ -1,4 +1,4 @@
#include "BLI_array_cxx.h"
#include "BLI_array.hh"
#include "testing/testing.h"
using namespace BLI;

@ -1,5 +1,5 @@
#include "BLI_index_range.h"
#include "BLI_vector.h"
#include "BLI_index_range.hh"
#include "BLI_vector.hh"
#include "testing/testing.h"
using BLI::ArrayRef;

@ -1,5 +1,5 @@
#include "BLI_map.h"
#include "BLI_set.h"
#include "BLI_map.hh"
#include "BLI_set.hh"
#include "testing/testing.h"
using BLI::Map;

@ -1,4 +1,4 @@
#include "BLI_optional.h"
#include "BLI_optional.hh"
#include "testing/testing.h"
#include <string>

@ -1,5 +1,5 @@
#include "BLI_set.h"
#include "BLI_vector.h"
#include "BLI_set.hh"
#include "BLI_vector.hh"
#include "testing/testing.h"
using BLI::Set;

@ -1,4 +1,4 @@
#include "BLI_stack_cxx.h"
#include "BLI_stack.hh"
#include "testing/testing.h"
using BLI::Stack;

@ -1,5 +1,5 @@
#include "BLI_string_map.h"
#include "BLI_vector.h"
#include "BLI_string_map.hh"
#include "BLI_vector.hh"
#include "testing/testing.h"
using namespace BLI;

@ -1,5 +1,5 @@
#include "BLI_string_ref.h"
#include "BLI_vector.h"
#include "BLI_string_ref.hh"
#include "BLI_vector.hh"
#include "testing/testing.h"
using BLI::StringRef;

@ -1,4 +1,4 @@
#include "BLI_vector_set.h"
#include "BLI_vector_set.hh"
#include "testing/testing.h"
using BLI::VectorSet;

@ -1,4 +1,4 @@
#include "BLI_vector.h"
#include "BLI_vector.hh"
#include "testing/testing.h"
#include <forward_list>