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-04-17 07:17:24 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-04-17 07:21:24 +0300
commite12c08e8d170b7ca40f204a5b0423c23a9fbc2c1 (patch)
tree8cf3453d12edb177a218ef8009357518ec6cab6a /source/blender/blenlib/BLI_compiler_compat.h
parentb3dabc200a4b0399ec6b81f2ff2730d07b44fcaa (diff)
ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
Diffstat (limited to 'source/blender/blenlib/BLI_compiler_compat.h')
-rw-r--r--source/blender/blenlib/BLI_compiler_compat.h33
1 files changed, 18 insertions, 15 deletions
diff --git a/source/blender/blenlib/BLI_compiler_compat.h b/source/blender/blenlib/BLI_compiler_compat.h
index 974f920f4b3..80c564a70c7 100644
--- a/source/blender/blenlib/BLI_compiler_compat.h
+++ b/source/blender/blenlib/BLI_compiler_compat.h
@@ -15,7 +15,7 @@
*/
#ifndef __BLI_COMPILER_COMPAT_H__
-#define __BLI_COMPILER_COMPAT_H__
+# define __BLI_COMPILER_COMPAT_H__
/** \file
* \ingroup bli
@@ -23,23 +23,26 @@
* Use to help with cross platform portability.
*/
-#if defined(_MSC_VER)
-# define alloca _alloca
-#endif
+# if defined(_MSC_VER)
+# define alloca _alloca
+# endif
-#if (defined(__GNUC__) || defined(__clang__)) && defined(__cplusplus)
+# if (defined(__GNUC__) || defined(__clang__)) && defined(__cplusplus)
extern "C++" {
- /* Some magic to be sure we don't have reference in the type. */
- template<typename T> static inline T decltype_helper(T x) { return x; }
-# define typeof(x) decltype(decltype_helper(x))
+/* Some magic to be sure we don't have reference in the type. */
+template<typename T> static inline T decltype_helper(T x)
+{
+ return x;
}
-#endif
+# define typeof(x) decltype(decltype_helper(x))
+}
+# endif
/* little macro so inline keyword works */
-#if defined(_MSC_VER)
-# define BLI_INLINE static __forceinline
-#else
-# define BLI_INLINE static inline __attribute__((always_inline)) __attribute__((__unused__))
-#endif
+# if defined(_MSC_VER)
+# define BLI_INLINE static __forceinline
+# else
+# define BLI_INLINE static inline __attribute__((always_inline)) __attribute__((__unused__))
+# endif
-#endif /* __BLI_COMPILER_COMPAT_H__ */
+#endif /* __BLI_COMPILER_COMPAT_H__ */