A lot of files were missing copyright field in the header and
the Blender Foundation contributed to them in a sense of bug
fixing and general maintenance.
This change makes it explicit that those files are at least
partially copyrighted by the Blender Foundation.
Note that this does not make it so the Blender Foundation is
the only holder of the copyright in those files, and developers
who do not have a signed contract with the foundation still
hold the copyright as well.
Another aspect of this change is using SPDX format for the
header. We already used it for the license specification,
and now we state it for the copyright as well, following the
FAQ:
https://reuse.software/faq/
46 lines
1015 B
C++
46 lines
1015 B
C++
/* SPDX-FileCopyrightText: 2023 Blender Foundation
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
/* clang-format off */
|
|
|
|
/* #define typeof() triggers a bug in some clang-format versions, disable format
|
|
* for entire file to keep results consistent. */
|
|
|
|
#pragma once
|
|
|
|
|
|
/** \file
|
|
* \ingroup bli
|
|
*
|
|
* Use to help with cross platform portability.
|
|
*/
|
|
|
|
#if defined(_MSC_VER)
|
|
# define alloca _alloca
|
|
#endif
|
|
|
|
#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))
|
|
}
|
|
#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(__GNUC__)
|
|
# define BLI_NOINLINE __attribute__((noinline))
|
|
#else
|
|
# define BLI_NOINLINE
|
|
#endif
|