Cleanup: use 'pragma once'
Add explanations for cases the header-guard defines are still used.
This commit is contained in:
@@ -14,13 +14,12 @@
|
|||||||
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __BKE_ASSET_H__
|
|
||||||
#define __BKE_ASSET_H__
|
|
||||||
|
|
||||||
/** \file
|
/** \file
|
||||||
* \ingroup bke
|
* \ingroup bke
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
@@ -55,5 +54,3 @@ void BKE_asset_metadata_read(struct BlendDataReader *reader, struct AssetMetaDat
|
|||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* __BKE_ASSET_H__ */
|
|
||||||
|
@@ -14,6 +14,7 @@
|
|||||||
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* Use a define instead of `#pragma once` because of `BLI_endian_switch_inline.h` */
|
||||||
#ifndef __BLI_ENDIAN_SWITCH_H__
|
#ifndef __BLI_ENDIAN_SWITCH_H__
|
||||||
#define __BLI_ENDIAN_SWITCH_H__
|
#define __BLI_ENDIAN_SWITCH_H__
|
||||||
|
|
||||||
|
@@ -14,6 +14,7 @@
|
|||||||
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* Use a define instead of `#pragma once` because of `BLI_utildefines.h` */
|
||||||
#ifndef __BLI_MEMORY_UTILS_H__
|
#ifndef __BLI_MEMORY_UTILS_H__
|
||||||
#define __BLI_MEMORY_UTILS_H__
|
#define __BLI_MEMORY_UTILS_H__
|
||||||
|
|
||||||
|
@@ -14,6 +14,7 @@
|
|||||||
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* Use a define instead of `#pragma once` because of `bmesh_iterators_inline.h` */
|
||||||
#ifndef __BLI_TASK_H__
|
#ifndef __BLI_TASK_H__
|
||||||
#define __BLI_TASK_H__
|
#define __BLI_TASK_H__
|
||||||
|
|
||||||
|
@@ -17,6 +17,7 @@
|
|||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* Use a define instead of `#pragma once` because of `BLI_memory_utils.h` */
|
||||||
#ifndef __BLI_UTILDEFINES_H__
|
#ifndef __BLI_UTILDEFINES_H__
|
||||||
#define __BLI_UTILDEFINES_H__
|
#define __BLI_UTILDEFINES_H__
|
||||||
|
|
||||||
|
@@ -1,7 +1,6 @@
|
|||||||
/* Apache License, Version 2.0 */
|
/* Apache License, Version 2.0 */
|
||||||
|
|
||||||
#ifndef __BLENDER_TESTING_BLI_RESSOURCE_STRING_H__
|
#pragma once
|
||||||
#define __BLENDER_TESTING_BLI_RESSOURCE_STRING_H__
|
|
||||||
|
|
||||||
/* Data file, don't format. */
|
/* Data file, don't format. */
|
||||||
/* clang-format off */
|
/* clang-format off */
|
||||||
@@ -606,5 +605,3 @@ const char words10k[] =
|
|||||||
;
|
;
|
||||||
|
|
||||||
/* clang-format on */
|
/* clang-format on */
|
||||||
|
|
||||||
#endif /* __BLENDER_TESTING_BLI_RESSOURCE_STRING_H__ */
|
|
||||||
|
@@ -15,8 +15,8 @@
|
|||||||
*
|
*
|
||||||
* The Original Code is Copyright (C) 2019 by Blender Foundation.
|
* The Original Code is Copyright (C) 2019 by Blender Foundation.
|
||||||
*/
|
*/
|
||||||
#ifndef __BLENDFILE_LOADING_BASE_TEST_H__
|
|
||||||
#define __BLENDFILE_LOADING_BASE_TEST_H__
|
#pragma once
|
||||||
|
|
||||||
#include "DEG_depsgraph.h"
|
#include "DEG_depsgraph.h"
|
||||||
#include "testing/testing.h"
|
#include "testing/testing.h"
|
||||||
@@ -60,5 +60,3 @@ class BlendfileLoadingBaseTest : public testing::Test {
|
|||||||
/* Free the depsgraph if it's not nullptr. */
|
/* Free the depsgraph if it's not nullptr. */
|
||||||
virtual void depsgraph_free();
|
virtual void depsgraph_free();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* __BLENDFILE_LOADING_BASE_TEST_H__ */
|
|
||||||
|
@@ -16,8 +16,7 @@
|
|||||||
* Copyright 2020, Blender Foundation.
|
* Copyright 2020, Blender Foundation.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __COM_EXPOSURENODE_H__
|
#pragma once
|
||||||
#define __COM_EXPOSURENODE_H__
|
|
||||||
|
|
||||||
#include "COM_Node.h"
|
#include "COM_Node.h"
|
||||||
|
|
||||||
@@ -30,5 +29,3 @@ class ExposureNode : public Node {
|
|||||||
ExposureNode(bNode *editorNode);
|
ExposureNode(bNode *editorNode);
|
||||||
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
|
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@@ -16,8 +16,8 @@
|
|||||||
* Copyright 2020, Blender Foundation.
|
* Copyright 2020, Blender Foundation.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __COM_COLOREXPOSUREOPERATION_H__
|
#pragma once
|
||||||
#define __COM_COLOREXPOSUREOPERATION_H__
|
|
||||||
#include "COM_NodeOperation.h"
|
#include "COM_NodeOperation.h"
|
||||||
|
|
||||||
class ExposureOperation : public NodeOperation {
|
class ExposureOperation : public NodeOperation {
|
||||||
@@ -46,4 +46,3 @@ class ExposureOperation : public NodeOperation {
|
|||||||
*/
|
*/
|
||||||
void deinitExecution();
|
void deinitExecution();
|
||||||
};
|
};
|
||||||
#endif
|
|
||||||
|
@@ -21,13 +21,10 @@
|
|||||||
* \ingroup edgeometry
|
* \ingroup edgeometry
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __GEOMETRY_INTERN_H__
|
#pragma once
|
||||||
#define __GEOMETRY_INTERN_H__
|
|
||||||
|
|
||||||
struct wmOperatorType;
|
struct wmOperatorType;
|
||||||
|
|
||||||
/* *** geometry_attributes.c *** */
|
/* *** geometry_attributes.c *** */
|
||||||
void GEOMETRY_OT_attribute_add(struct wmOperatorType *ot);
|
void GEOMETRY_OT_attribute_add(struct wmOperatorType *ot);
|
||||||
void GEOMETRY_OT_attribute_remove(struct wmOperatorType *ot);
|
void GEOMETRY_OT_attribute_remove(struct wmOperatorType *ot);
|
||||||
|
|
||||||
#endif /* __GEOMETRY_INTERN_H__ */
|
|
||||||
|
@@ -21,8 +21,7 @@
|
|||||||
* \ingroup edgpencil
|
* \ingroup edgpencil
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __GPENCIL_TRACE_H__
|
#pragma once
|
||||||
#define __GPENCIL_TRACE_H__
|
|
||||||
|
|
||||||
/* internal exports only */
|
/* internal exports only */
|
||||||
struct FILE;
|
struct FILE;
|
||||||
@@ -79,5 +78,3 @@ void ED_gpencil_trace_data_to_strokes(struct Main *bmain,
|
|||||||
const float sample,
|
const float sample,
|
||||||
const int32_t resolution,
|
const int32_t resolution,
|
||||||
const int32_t thickness);
|
const int32_t thickness);
|
||||||
|
|
||||||
#endif /* __GPENCIL_TRACE_H__ */
|
|
||||||
|
@@ -18,8 +18,7 @@
|
|||||||
* \ingroup editors
|
* \ingroup editors
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __ED_ASSET_H__
|
#pragma once
|
||||||
#define __ED_ASSET_H__
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@@ -35,5 +34,3 @@ void ED_operatortypes_asset(void);
|
|||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* __ED_ASSET_H__ */
|
|
||||||
|
@@ -21,8 +21,7 @@
|
|||||||
* \ingroup editors
|
* \ingroup editors
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __ED_GEOMETRY_H__
|
#pragma once
|
||||||
#define __ED_GEOMETRY_H__
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@@ -33,5 +32,3 @@ void ED_operatortypes_geometry(void);
|
|||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* __ED_GEOMETRY_H__ */
|
|
||||||
|
@@ -18,11 +18,14 @@
|
|||||||
* \ingroup DNA
|
* \ingroup DNA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __DNA_ASSET_TYPES_H__
|
#pragma once
|
||||||
#define __DNA_ASSET_TYPES_H__
|
|
||||||
|
|
||||||
#include "DNA_listBase.h"
|
#include "DNA_listBase.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief User defined tag.
|
* \brief User defined tag.
|
||||||
* Currently only used by assets, could be used more often at some point.
|
* Currently only used by assets, could be used more often at some point.
|
||||||
@@ -59,4 +62,6 @@ typedef struct AssetMetaData {
|
|||||||
char _pad[4];
|
char _pad[4];
|
||||||
} AssetMetaData;
|
} AssetMetaData;
|
||||||
|
|
||||||
#endif /* __DNA_ASSET_TYPES_H__ */
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
@@ -14,6 +14,7 @@
|
|||||||
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* Use a define instead of `#pragma once` because of `rna_internal.h` */
|
||||||
#ifndef __RNA_ACCESS_H__
|
#ifndef __RNA_ACCESS_H__
|
||||||
#define __RNA_ACCESS_H__
|
#define __RNA_ACCESS_H__
|
||||||
|
|
||||||
|
@@ -18,6 +18,7 @@
|
|||||||
* \ingroup RNA
|
* \ingroup RNA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* Use a define instead of `#pragma once` because of `BKE_addon.h`, `ED_object.h` & others. */
|
||||||
#ifndef __RNA_TYPES_H__
|
#ifndef __RNA_TYPES_H__
|
||||||
#define __RNA_TYPES_H__
|
#define __RNA_TYPES_H__
|
||||||
|
|
||||||
|
@@ -18,6 +18,7 @@
|
|||||||
* \ingroup pygen
|
* \ingroup pygen
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* Use a define instead of `#pragma once` because of `bmesh_py_types.h` */
|
||||||
#ifndef __PY_CAPI_UTILS_H__
|
#ifndef __PY_CAPI_UTILS_H__
|
||||||
#define __PY_CAPI_UTILS_H__
|
#define __PY_CAPI_UTILS_H__
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user