From b274d18aec525621bcb0a2234fc65e09398616c2 Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Tue, 28 Jul 2020 16:32:30 +0200 Subject: Cleanup: correct usage of extern-C blocks in various places This removes extern-C blocks around other includes and adds such blocks for some headers that need them. --- source/blender/freestyle/intern/application/AppConfig.cpp | 2 -- source/blender/freestyle/intern/application/AppView.cpp | 2 -- source/blender/freestyle/intern/blender_interface/BlenderFileLoader.h | 2 -- source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp | 4 ++-- source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp | 2 -- source/blender/freestyle/intern/system/PythonInterpreter.h | 2 -- source/blender/freestyle/intern/system/RenderMonitor.h | 2 -- source/blender/freestyle/intern/system/StringUtils.h | 2 -- 8 files changed, 2 insertions(+), 16 deletions(-) (limited to 'source/blender/freestyle/intern') diff --git a/source/blender/freestyle/intern/application/AppConfig.cpp b/source/blender/freestyle/intern/application/AppConfig.cpp index b26c9a58f70..3aae4254b4b 100644 --- a/source/blender/freestyle/intern/application/AppConfig.cpp +++ b/source/blender/freestyle/intern/application/AppConfig.cpp @@ -26,9 +26,7 @@ using namespace std; -extern "C" { #include "BKE_appdir.h" -} namespace Freestyle { diff --git a/source/blender/freestyle/intern/application/AppView.cpp b/source/blender/freestyle/intern/application/AppView.cpp index 0956d33a20e..5cd30a61712 100644 --- a/source/blender/freestyle/intern/application/AppView.cpp +++ b/source/blender/freestyle/intern/application/AppView.cpp @@ -33,7 +33,6 @@ #include "../view_map/Silhouette.h" #include "../view_map/ViewMap.h" -extern "C" { #include "BLI_blenlib.h" #include "IMB_imbuf.h" @@ -45,7 +44,6 @@ extern "C" { #endif #include "FRS_freestyle.h" -} namespace Freestyle { diff --git a/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.h b/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.h index d9387b221f8..9d8b7e55fbb 100644 --- a/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.h +++ b/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.h @@ -37,7 +37,6 @@ #include "MEM_guardedalloc.h" -extern "C" { #include "DNA_material_types.h" #include "DNA_mesh_types.h" #include "DNA_meshdata_types.h" @@ -56,7 +55,6 @@ extern "C" { #include "BLI_iterator.h" #include "BLI_listbase.h" #include "BLI_math.h" -} #include "DEG_depsgraph_query.h" diff --git a/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp b/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp index 26070a88e5d..51ac281e330 100644 --- a/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp +++ b/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp @@ -34,8 +34,6 @@ using namespace Freestyle; #include "MEM_guardedalloc.h" -extern "C" { - #include "DNA_camera_types.h" #include "DNA_collection_types.h" #include "DNA_freestyle_types.h" @@ -65,6 +63,8 @@ extern "C" { #include "FRS_freestyle.h" +extern "C" { + #define DEFAULT_SPHERE_RADIUS 1.0f #define DEFAULT_DKR_EPSILON 0.0f diff --git a/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp b/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp index d969e0e50a3..36234ad619c 100644 --- a/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp +++ b/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp @@ -37,10 +37,8 @@ #include "BKE_global.h" -extern "C" { #include "IMB_imbuf.h" #include "IMB_imbuf_types.h" -} namespace Freestyle { diff --git a/source/blender/freestyle/intern/system/PythonInterpreter.h b/source/blender/freestyle/intern/system/PythonInterpreter.h index 4bc6ba9db38..8099ed63199 100644 --- a/source/blender/freestyle/intern/system/PythonInterpreter.h +++ b/source/blender/freestyle/intern/system/PythonInterpreter.h @@ -34,7 +34,6 @@ extern "C" { #include "MEM_guardedalloc.h" // soc -extern "C" { #include "DNA_text_types.h" #include "BKE_context.h" @@ -47,7 +46,6 @@ extern "C" { #include "BPY_extern.h" #include "bpy_capi_utils.h" -} namespace Freestyle { diff --git a/source/blender/freestyle/intern/system/RenderMonitor.h b/source/blender/freestyle/intern/system/RenderMonitor.h index 709df6c2d8e..eef4683328b 100644 --- a/source/blender/freestyle/intern/system/RenderMonitor.h +++ b/source/blender/freestyle/intern/system/RenderMonitor.h @@ -22,9 +22,7 @@ * \brief Classes defining the basic "Iterator" design pattern */ -extern "C" { #include "render_types.h" -} #ifdef WITH_CXX_GUARDEDALLOC # include "MEM_guardedalloc.h" diff --git a/source/blender/freestyle/intern/system/StringUtils.h b/source/blender/freestyle/intern/system/StringUtils.h index aeacddd64c8..fd97ca5b032 100644 --- a/source/blender/freestyle/intern/system/StringUtils.h +++ b/source/blender/freestyle/intern/system/StringUtils.h @@ -28,10 +28,8 @@ #include #include -extern "C" { #include "BLI_path_util.h" #include "BLI_string.h" -} using namespace std; -- cgit v1.2.3