From 923e8fabdb2b3052357793c95cecff77e403b091 Mon Sep 17 00:00:00 2001 From: jules Date: Thu, 24 Dec 2015 11:55:46 +0000 Subject: [PATCH] Removed some unnecessary includes of AppConfig.h --- .../juce_audio_basics/juce_audio_basics.cpp | 3 --- .../juce_audio_devices/juce_audio_devices.cpp | 4 ---- .../juce_audio_formats/juce_audio_formats.cpp | 4 ---- .../juce_audio_processors.cpp | 4 ---- modules/juce_audio_utils/juce_audio_utils.cpp | 4 ---- modules/juce_box2d/juce_box2d.cpp | 4 ---- .../juce_browser_plugin.cpp | 4 ---- modules/juce_core/juce_core.cpp | 5 ----- modules/juce_core/juce_core.h | 21 +------------------ .../juce_core/system/juce_TargetPlatform.h | 9 ++++++++ .../juce_cryptography/juce_cryptography.cpp | 4 ---- .../juce_data_structures.cpp | 4 ---- modules/juce_events/juce_events.cpp | 4 ---- modules/juce_graphics/juce_graphics.cpp | 4 ---- modules/juce_gui_basics/juce_gui_basics.cpp | 4 ---- modules/juce_gui_extra/juce_gui_extra.cpp | 4 ---- modules/juce_opengl/juce_opengl.cpp | 4 ---- modules/juce_osc/juce_osc.cpp | 5 ----- .../juce_tracktion_marketplace.cpp | 4 ---- modules/juce_video/juce_video.cpp | 4 ---- 20 files changed, 10 insertions(+), 93 deletions(-) diff --git a/modules/juce_audio_basics/juce_audio_basics.cpp b/modules/juce_audio_basics/juce_audio_basics.cpp index 93349c3340..bf6791f1d6 100644 --- a/modules/juce_audio_basics/juce_audio_basics.cpp +++ b/modules/juce_audio_basics/juce_audio_basics.cpp @@ -31,9 +31,6 @@ #error "Incorrect use of JUCE cpp file" #endif -// Your project must contain an AppConfig.h file with your project-specific settings in it, -// and your header search path must make it accessible to the module's files. -#include "AppConfig.h" #include "juce_audio_basics.h" #if JUCE_MINGW && ! defined (__SSE2__) diff --git a/modules/juce_audio_devices/juce_audio_devices.cpp b/modules/juce_audio_devices/juce_audio_devices.cpp index 695e272de3..172b0e557a 100644 --- a/modules/juce_audio_devices/juce_audio_devices.cpp +++ b/modules/juce_audio_devices/juce_audio_devices.cpp @@ -31,10 +31,6 @@ #error "Incorrect use of JUCE cpp file" #endif -// Your project must contain an AppConfig.h file with your project-specific settings in it, -// and your header search path must make it accessible to the module's files. -#include "AppConfig.h" - #include "../juce_core/native/juce_BasicNativeHeaders.h" #include "juce_audio_devices.h" diff --git a/modules/juce_audio_formats/juce_audio_formats.cpp b/modules/juce_audio_formats/juce_audio_formats.cpp index 33780c680c..370a084fc3 100644 --- a/modules/juce_audio_formats/juce_audio_formats.cpp +++ b/modules/juce_audio_formats/juce_audio_formats.cpp @@ -31,10 +31,6 @@ #error "Incorrect use of JUCE cpp file" #endif -// Your project must contain an AppConfig.h file with your project-specific settings in it, -// and your header search path must make it accessible to the module's files. -#include "AppConfig.h" - #include "../juce_core/native/juce_BasicNativeHeaders.h" #include "juce_audio_formats.h" diff --git a/modules/juce_audio_processors/juce_audio_processors.cpp b/modules/juce_audio_processors/juce_audio_processors.cpp index 7b365d7794..cd222c106d 100644 --- a/modules/juce_audio_processors/juce_audio_processors.cpp +++ b/modules/juce_audio_processors/juce_audio_processors.cpp @@ -31,10 +31,6 @@ #error "Incorrect use of JUCE cpp file" #endif -// Your project must contain an AppConfig.h file with your project-specific settings in it, -// and your header search path must make it accessible to the module's files. -#include "AppConfig.h" - #include "../juce_core/native/juce_BasicNativeHeaders.h" #include "juce_audio_processors.h" #include "../juce_gui_extra/juce_gui_extra.h" diff --git a/modules/juce_audio_utils/juce_audio_utils.cpp b/modules/juce_audio_utils/juce_audio_utils.cpp index d38d3c41e8..fc845b66b9 100644 --- a/modules/juce_audio_utils/juce_audio_utils.cpp +++ b/modules/juce_audio_utils/juce_audio_utils.cpp @@ -31,10 +31,6 @@ #error "Incorrect use of JUCE cpp file" #endif -// Your project must contain an AppConfig.h file with your project-specific settings in it, -// and your header search path must make it accessible to the module's files. -#include "AppConfig.h" - #include "../juce_core/native/juce_BasicNativeHeaders.h" #include "juce_audio_utils.h" diff --git a/modules/juce_box2d/juce_box2d.cpp b/modules/juce_box2d/juce_box2d.cpp index a2c2dbf3f9..f9d9713ffc 100644 --- a/modules/juce_box2d/juce_box2d.cpp +++ b/modules/juce_box2d/juce_box2d.cpp @@ -31,10 +31,6 @@ #error "Incorrect use of JUCE cpp file" #endif -// Your project must contain an AppConfig.h file with your project-specific settings in it, -// and your header search path must make it accessible to the module's files. -#include "AppConfig.h" - #include "juce_box2d.h" #include "box2d/Collision/b2BroadPhase.cpp" diff --git a/modules/juce_browser_plugin_client/juce_browser_plugin.cpp b/modules/juce_browser_plugin_client/juce_browser_plugin.cpp index 08f8c48de0..897386fce6 100644 --- a/modules/juce_browser_plugin_client/juce_browser_plugin.cpp +++ b/modules/juce_browser_plugin_client/juce_browser_plugin.cpp @@ -31,10 +31,6 @@ #error "Incorrect use of JUCE cpp file" #endif -// Your project must contain an AppConfig.h file with your project-specific settings in it, -// and your header search path must make it accessible to the module's files. -#include "AppConfig.h" - #include "../juce_core/native/juce_BasicNativeHeaders.h" #if _MSC_VER diff --git a/modules/juce_core/juce_core.cpp b/modules/juce_core/juce_core.cpp index acb91759cd..c43d0cd8e3 100644 --- a/modules/juce_core/juce_core.cpp +++ b/modules/juce_core/juce_core.cpp @@ -35,11 +35,6 @@ #error "Incorrect use of JUCE cpp file" #endif -// Your project must contain an AppConfig.h file with your project-specific settings in it, -// and your header search path must make it accessible to the module's files. -#include "AppConfig.h" - -//============================================================================== #include "native/juce_BasicNativeHeaders.h" #include "juce_core.h" diff --git a/modules/juce_core/juce_core.h b/modules/juce_core/juce_core.h index 13aef04c83..e9beac3d38 100644 --- a/modules/juce_core/juce_core.h +++ b/modules/juce_core/juce_core.h @@ -29,25 +29,7 @@ #ifndef JUCE_CORE_H_INCLUDED #define JUCE_CORE_H_INCLUDED -#ifndef JUCE_MODULE_AVAILABLE_juce_core - /* If you fail to make sure that all your compile units are building JUCE with the same set of - option flags, then there's a risk that different compile units will treat the classes as having - different memory layouts, leading to very nasty memory corruption errors when they all get - linked together. That's why it's best to always include the Introjucer-generated AppConfig.h - file before any juce headers. - - Note that if you do have an AppConfig.h file and hit this warning, it means that it doesn't - contain the JUCE_MODULE_AVAILABLE_xxx flags, which are necessary for some inter-module - functionality to work correctly. In that case, you should either rebuild your AppConfig.h with - the latest introjucer, or fix it manually to contain these flags. - */ - #ifdef _MSC_VER - #pragma message ("Have you included your AppConfig.h file before including the JUCE headers?") - #else - #warning "Have you included your AppConfig.h file before including the JUCE headers?" - #endif -#endif - +//============================================================================== #ifdef _MSC_VER #pragma warning (push) // Disable warnings for long class names, padding, and undefined preprocessor definitions. @@ -57,7 +39,6 @@ #endif #endif -//============================================================================== #include "system/juce_TargetPlatform.h" //============================================================================= diff --git a/modules/juce_core/system/juce_TargetPlatform.h b/modules/juce_core/system/juce_TargetPlatform.h index aae410a079..6dd0130858 100644 --- a/modules/juce_core/system/juce_TargetPlatform.h +++ b/modules/juce_core/system/juce_TargetPlatform.h @@ -42,6 +42,15 @@ - Either JUCE_GCC or JUCE_MSVC */ +//============================================================================== +#ifdef JUCE_APP_CONFIG_HEADER + #include JUCE_APP_CONFIG_HEADER +#else + // Your project must contain an AppConfig.h file with your project-specific settings in it, + // and your header search path must make it accessible to the module's files. + #include "AppConfig.h" +#endif + //============================================================================== #if (defined (_WIN32) || defined (_WIN64)) #define JUCE_WIN32 1 diff --git a/modules/juce_cryptography/juce_cryptography.cpp b/modules/juce_cryptography/juce_cryptography.cpp index 520b186ebd..c37ee2e7bc 100644 --- a/modules/juce_cryptography/juce_cryptography.cpp +++ b/modules/juce_cryptography/juce_cryptography.cpp @@ -31,10 +31,6 @@ #error "Incorrect use of JUCE cpp file" #endif -// Your project must contain an AppConfig.h file with your project-specific settings in it, -// and your header search path must make it accessible to the module's files. -#include "AppConfig.h" - #include "juce_cryptography.h" namespace juce diff --git a/modules/juce_data_structures/juce_data_structures.cpp b/modules/juce_data_structures/juce_data_structures.cpp index cf1b2fe53f..e6d7784a4f 100644 --- a/modules/juce_data_structures/juce_data_structures.cpp +++ b/modules/juce_data_structures/juce_data_structures.cpp @@ -31,10 +31,6 @@ #error "Incorrect use of JUCE cpp file" #endif -// Your project must contain an AppConfig.h file with your project-specific settings in it, -// and your header search path must make it accessible to the module's files. -#include "AppConfig.h" - #include "juce_data_structures.h" namespace juce diff --git a/modules/juce_events/juce_events.cpp b/modules/juce_events/juce_events.cpp index df74b21e25..89adf04dcc 100644 --- a/modules/juce_events/juce_events.cpp +++ b/modules/juce_events/juce_events.cpp @@ -31,10 +31,6 @@ #error "Incorrect use of JUCE cpp file" #endif -// Your project must contain an AppConfig.h file with your project-specific settings in it, -// and your header search path must make it accessible to the module's files. -#include "AppConfig.h" - #include "../juce_core/native/juce_BasicNativeHeaders.h" #include "juce_events.h" diff --git a/modules/juce_graphics/juce_graphics.cpp b/modules/juce_graphics/juce_graphics.cpp index 9d0b1833ad..4c0b2e0aa9 100644 --- a/modules/juce_graphics/juce_graphics.cpp +++ b/modules/juce_graphics/juce_graphics.cpp @@ -31,10 +31,6 @@ #error "Incorrect use of JUCE cpp file" #endif -// Your project must contain an AppConfig.h file with your project-specific settings in it, -// and your header search path must make it accessible to the module's files. -#include "AppConfig.h" - #include "../juce_core/native/juce_BasicNativeHeaders.h" #include "juce_graphics.h" diff --git a/modules/juce_gui_basics/juce_gui_basics.cpp b/modules/juce_gui_basics/juce_gui_basics.cpp index 72c79aea0b..33a5955438 100644 --- a/modules/juce_gui_basics/juce_gui_basics.cpp +++ b/modules/juce_gui_basics/juce_gui_basics.cpp @@ -31,10 +31,6 @@ #error "Incorrect use of JUCE cpp file" #endif -// Your project must contain an AppConfig.h file with your project-specific settings in it, -// and your header search path must make it accessible to the module's files. -#include "AppConfig.h" - #define NS_FORMAT_FUNCTION(F,A) // To avoid spurious warnings from GCC #include "../juce_core/native/juce_BasicNativeHeaders.h" diff --git a/modules/juce_gui_extra/juce_gui_extra.cpp b/modules/juce_gui_extra/juce_gui_extra.cpp index 9a38d7d426..96b15280ae 100644 --- a/modules/juce_gui_extra/juce_gui_extra.cpp +++ b/modules/juce_gui_extra/juce_gui_extra.cpp @@ -31,10 +31,6 @@ #error "Incorrect use of JUCE cpp file" #endif -// Your project must contain an AppConfig.h file with your project-specific settings in it, -// and your header search path must make it accessible to the module's files. -#include "AppConfig.h" - #include "../juce_core/native/juce_BasicNativeHeaders.h" #include "juce_gui_extra.h" diff --git a/modules/juce_opengl/juce_opengl.cpp b/modules/juce_opengl/juce_opengl.cpp index a7a02e7e31..ba3adadf8c 100644 --- a/modules/juce_opengl/juce_opengl.cpp +++ b/modules/juce_opengl/juce_opengl.cpp @@ -31,10 +31,6 @@ #error "Incorrect use of JUCE cpp file" #endif -// Your project must contain an AppConfig.h file with your project-specific settings in it, -// and your header search path must make it accessible to the module's files. -#include "AppConfig.h" - #include "../juce_core/native/juce_BasicNativeHeaders.h" #include "juce_opengl.h" diff --git a/modules/juce_osc/juce_osc.cpp b/modules/juce_osc/juce_osc.cpp index 4708aaad7f..944b6a0124 100644 --- a/modules/juce_osc/juce_osc.cpp +++ b/modules/juce_osc/juce_osc.cpp @@ -31,13 +31,8 @@ #error "Incorrect use of JUCE cpp file" #endif -// Your project must contain an AppConfig.h file with your project-specific settings in it, -// and your header search path must make it accessible to the module's files. -#include "AppConfig.h" - #include "juce_osc.h" - namespace juce { #include "osc/juce_OSCTypes.cpp" diff --git a/modules/juce_tracktion_marketplace/juce_tracktion_marketplace.cpp b/modules/juce_tracktion_marketplace/juce_tracktion_marketplace.cpp index 21db91125d..80c8c5f2d5 100644 --- a/modules/juce_tracktion_marketplace/juce_tracktion_marketplace.cpp +++ b/modules/juce_tracktion_marketplace/juce_tracktion_marketplace.cpp @@ -31,10 +31,6 @@ #error "Incorrect use of JUCE cpp file" #endif -// Your project must contain an AppConfig.h file with your project-specific settings in it, -// and your header search path must make it accessible to the module's files. -#include "AppConfig.h" - #include "juce_tracktion_marketplace.h" namespace juce diff --git a/modules/juce_video/juce_video.cpp b/modules/juce_video/juce_video.cpp index 7aea0585b7..8f60ab9da7 100644 --- a/modules/juce_video/juce_video.cpp +++ b/modules/juce_video/juce_video.cpp @@ -31,10 +31,6 @@ #error "Incorrect use of JUCE cpp file" #endif -// Your project must contain an AppConfig.h file with your project-specific settings in it, -// and your header search path must make it accessible to the module's files. -#include "AppConfig.h" - #include "../juce_core/native/juce_BasicNativeHeaders.h" #include "../juce_gui_extra/juce_gui_extra.h" #include "juce_video.h"