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