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:
authorJacques Lucke <jacques@blender.org>2020-05-08 19:16:39 +0300
committerJacques Lucke <jacques@blender.org>2020-05-08 19:22:41 +0300
commit6f985574b775882075f48f59835bc5a42b1374dd (patch)
treeb68afdd1a5ef313ef13ad7d7ed46b6f6f92e8000 /source/blender/makesdna
parent0d0dcfd64343930ba66e70c400cbd66f20a85b4f (diff)
Cleanup: take includes out of 'extern "C"' blocks
Surrounding includes with an 'extern "C"' block is not necessary anymore. Also that made it harder to add any C++ code to some headers, or include headers that have "optional" C++ code like `MEM_guardedalloc.h`. I tested compilation on linux and windows (and got help from @LazyDodo). If this still breaks compilation due to some linker error, the header containing the symbol in question is probably missing an 'extern "C"' block. Differential Revision: https://developer.blender.org/D7653
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_ID.h3
-rw-r--r--source/blender/makesdna/DNA_action_types.h8
-rw-r--r--source/blender/makesdna/DNA_anim_types.h8
-rw-r--r--source/blender/makesdna/DNA_customdata_types.h4
-rw-r--r--source/blender/makesdna/DNA_defaults.h4
-rw-r--r--source/blender/makesdna/DNA_layer_types.h6
-rw-r--r--source/blender/makesdna/DNA_movieclip_types.h8
-rw-r--r--source/blender/makesdna/DNA_object_force_types.h6
-rw-r--r--source/blender/makesdna/DNA_scene_types.h8
9 files changed, 27 insertions, 28 deletions
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h
index 289f8c7a7b9..39f22fb9555 100644
--- a/source/blender/makesdna/DNA_ID.h
+++ b/source/blender/makesdna/DNA_ID.h
@@ -25,14 +25,13 @@
#ifndef __DNA_ID_H__
#define __DNA_ID_H__
+#include "DNA_defs.h"
#include "DNA_listBase.h"
#ifdef __cplusplus
extern "C" {
#endif
-#include "DNA_defs.h"
-
struct FileData;
struct GHash;
struct GPUTexture;
diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h
index 40c25d39cad..c95a701a78a 100644
--- a/source/blender/makesdna/DNA_action_types.h
+++ b/source/blender/makesdna/DNA_action_types.h
@@ -28,16 +28,16 @@
#ifndef __DNA_ACTION_TYPES_H__
#define __DNA_ACTION_TYPES_H__
-#ifdef __cplusplus
-extern "C" {
-#endif
-
#include "DNA_ID.h"
#include "DNA_listBase.h"
#include "DNA_userdef_types.h" /* ThemeWireColor */
#include "DNA_vec_types.h"
#include "DNA_view2d_types.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct Collection;
struct GHash;
struct Object;
diff --git a/source/blender/makesdna/DNA_anim_types.h b/source/blender/makesdna/DNA_anim_types.h
index fbffa039ee9..6a024ec9e7e 100644
--- a/source/blender/makesdna/DNA_anim_types.h
+++ b/source/blender/makesdna/DNA_anim_types.h
@@ -24,15 +24,15 @@
#ifndef __DNA_ANIM_TYPES_H__
#define __DNA_ANIM_TYPES_H__
-#ifdef __cplusplus
-extern "C" {
-#endif
-
#include "DNA_ID.h"
#include "DNA_action_types.h"
#include "DNA_curve_types.h"
#include "DNA_listBase.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* ************************************************ */
/* F-Curve DataTypes */
diff --git a/source/blender/makesdna/DNA_customdata_types.h b/source/blender/makesdna/DNA_customdata_types.h
index 5ee16c2631d..e99d7fd5609 100644
--- a/source/blender/makesdna/DNA_customdata_types.h
+++ b/source/blender/makesdna/DNA_customdata_types.h
@@ -26,12 +26,12 @@
#ifndef __DNA_CUSTOMDATA_TYPES_H__
#define __DNA_CUSTOMDATA_TYPES_H__
+#include "DNA_defs.h"
+
#ifdef __cplusplus
extern "C" {
#endif
-#include "DNA_defs.h"
-
/** Descriptor and storage for a custom data layer. */
typedef struct CustomDataLayer {
/** Type of data in layer. */
diff --git a/source/blender/makesdna/DNA_defaults.h b/source/blender/makesdna/DNA_defaults.h
index 9b4a05034df..ca5ac649e33 100644
--- a/source/blender/makesdna/DNA_defaults.h
+++ b/source/blender/makesdna/DNA_defaults.h
@@ -29,12 +29,12 @@
#include "BLI_utildefines.h"
+#include "dna_type_offsets.h"
+
#ifdef __cplusplus
extern "C" {
#endif
-#include "dna_type_offsets.h"
-
extern const void *DNA_default_table[SDNA_TYPE_MAX];
char *_DNA_struct_default_alloc_impl(const char *data_src, size_t size, const char *alloc_str);
diff --git a/source/blender/makesdna/DNA_layer_types.h b/source/blender/makesdna/DNA_layer_types.h
index ef129a92699..6348dc5f03d 100644
--- a/source/blender/makesdna/DNA_layer_types.h
+++ b/source/blender/makesdna/DNA_layer_types.h
@@ -21,13 +21,13 @@
#ifndef __DNA_LAYER_TYPES_H__
#define __DNA_LAYER_TYPES_H__
+#include "DNA_freestyle_types.h"
+#include "DNA_listBase.h"
+
#ifdef __cplusplus
extern "C" {
#endif
-#include "DNA_freestyle_types.h"
-#include "DNA_listBase.h"
-
/**
* Render-passes for EEVEE.
* #ViewLayerEEVEE.render_passes
diff --git a/source/blender/makesdna/DNA_movieclip_types.h b/source/blender/makesdna/DNA_movieclip_types.h
index 557e069a4a6..94d11095108 100644
--- a/source/blender/makesdna/DNA_movieclip_types.h
+++ b/source/blender/makesdna/DNA_movieclip_types.h
@@ -24,14 +24,14 @@
#ifndef __DNA_MOVIECLIP_TYPES_H__
#define __DNA_MOVIECLIP_TYPES_H__
-#ifdef __cplusplus
-extern "C" {
-#endif
-
#include "DNA_ID.h"
#include "DNA_color_types.h" /* for color management */
#include "DNA_tracking_types.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct AnimData;
struct ImBuf;
struct MovieClipProxy;
diff --git a/source/blender/makesdna/DNA_object_force_types.h b/source/blender/makesdna/DNA_object_force_types.h
index daa3a629d27..73cfcddf984 100644
--- a/source/blender/makesdna/DNA_object_force_types.h
+++ b/source/blender/makesdna/DNA_object_force_types.h
@@ -24,13 +24,13 @@
#ifndef __DNA_OBJECT_FORCE_TYPES_H__
#define __DNA_OBJECT_FORCE_TYPES_H__
+#include "DNA_defs.h"
+#include "DNA_listBase.h"
+
#ifdef __cplusplus
extern "C" {
#endif
-#include "DNA_defs.h"
-#include "DNA_listBase.h"
-
/* pd->forcefield: Effector Fields types */
typedef enum ePFieldType {
/** (this is used for general effector weight). */
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index 357c1158b47..3ed9ce1ea06 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -29,10 +29,6 @@
/* XXX, temp feature - campbell */
#define DURIAN_CAMERA_SWITCH
-#ifdef __cplusplus
-extern "C" {
-#endif
-
#include "DNA_ID.h"
#include "DNA_collection_types.h"
#include "DNA_color_types.h" /* color management */
@@ -46,6 +42,10 @@ extern "C" {
#include "DNA_vec_types.h"
#include "DNA_view3d_types.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct AnimData;
struct Brush;
struct Collection;