Cleanup: Alembic, replace ABC_INLINE with BLI_INLINE

The `ABC_INLINE` macro has been in the Alembic code since it was introduced
to Blender in rB61050f75b13e. It basically does the same a `BLI_INLINE`,
though, so there is no need to keep it around.
This commit is contained in:
2020-06-19 17:05:11 +02:00
parent f84414d6e1
commit 71363dd79c
4 changed files with 12 additions and 20 deletions

View File

@@ -22,13 +22,9 @@
* \ingroup Alembic
*/
struct Object;
#include "BLI_compiler_compat.h"
#ifdef _MSC_VER
# define ABC_INLINE static __forceinline
#else
# define ABC_INLINE static inline
#endif
struct Object;
namespace blender {
namespace io {
@@ -41,7 +37,7 @@ namespace alembic {
/* Copy from Y-up to Z-up. */
ABC_INLINE void copy_zup_from_yup(float zup[3], const float yup[3])
BLI_INLINE void copy_zup_from_yup(float zup[3], const float yup[3])
{
const float old_yup1 = yup[1]; /* in case zup == yup */
zup[0] = yup[0];
@@ -49,7 +45,7 @@ ABC_INLINE void copy_zup_from_yup(float zup[3], const float yup[3])
zup[2] = old_yup1;
}
ABC_INLINE void copy_zup_from_yup(short zup[3], const short yup[3])
BLI_INLINE void copy_zup_from_yup(short zup[3], const short yup[3])
{
const short old_yup1 = yup[1]; /* in case zup == yup */
zup[0] = yup[0];
@@ -59,7 +55,7 @@ ABC_INLINE void copy_zup_from_yup(short zup[3], const short yup[3])
/* Copy from Z-up to Y-up. */
ABC_INLINE void copy_yup_from_zup(float yup[3], const float zup[3])
BLI_INLINE void copy_yup_from_zup(float yup[3], const float zup[3])
{
const float old_zup1 = zup[1]; /* in case yup == zup */
yup[0] = zup[0];
@@ -67,7 +63,7 @@ ABC_INLINE void copy_yup_from_zup(float yup[3], const float zup[3])
yup[2] = -old_zup1;
}
ABC_INLINE void copy_yup_from_zup(short yup[3], const short zup[3])
BLI_INLINE void copy_yup_from_zup(short yup[3], const short zup[3])
{
const short old_zup1 = zup[1]; /* in case yup == zup */
yup[0] = zup[0];

View File

@@ -32,6 +32,7 @@
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
#include "BLI_compiler_compat.h"
#include "BLI_math_geom.h"
#include "BKE_main.h"
@@ -343,7 +344,7 @@ static void process_normals(CDStreamConfig &config,
}
}
ABC_INLINE void read_uvs_params(CDStreamConfig &config,
BLI_INLINE void read_uvs_params(CDStreamConfig &config,
AbcMeshData &abc_data,
const IV2fGeomParam &uv,
const ISampleSelector &selector)
@@ -718,7 +719,7 @@ void AbcMeshReader::readFaceSetsSample(Main *bmain, Mesh *mesh, const ISampleSel
/* ************************************************************************** */
ABC_INLINE MEdge *find_edge(MEdge *edges, int totedge, int v1, int v2)
BLI_INLINE MEdge *find_edge(MEdge *edges, int totedge, int v1, int v2)
{
for (int i = 0, e = totedge; i < e; i++) {
MEdge &edge = edges[i];

View File

@@ -22,12 +22,6 @@
#include <Alembic/Abc/All.h>
#include <Alembic/AbcGeom/All.h>
#ifdef _MSC_VER
# define ABC_INLINE static __forceinline
#else
# define ABC_INLINE static inline
#endif
/**
* \brief The CacheReader struct is only used for anonymous pointers,
* to interface between C and C++ code. This library only creates

View File

@@ -57,6 +57,7 @@
#include "BKE_screen.h"
#undef new
#include "BLI_compiler_compat.h"
#include "BLI_fileops.h"
#include "BLI_ghash.h"
#include "BLI_listbase.h"
@@ -105,12 +106,12 @@ struct AbcArchiveHandle {
int unused;
};
ABC_INLINE ArchiveReader *archive_from_handle(AbcArchiveHandle *handle)
BLI_INLINE ArchiveReader *archive_from_handle(AbcArchiveHandle *handle)
{
return reinterpret_cast<ArchiveReader *>(handle);
}
ABC_INLINE AbcArchiveHandle *handle_from_archive(ArchiveReader *archive)
BLI_INLINE AbcArchiveHandle *handle_from_archive(ArchiveReader *archive)
{
return reinterpret_cast<AbcArchiveHandle *>(archive);
}