I see that we have a such way of include header files:
#include "sdk_precomp.h"
#ifndef CB_PRECOMP
#include "xxxx.h"
#include "yyyy.h"
#endif
If CB_PRECOMP is defined, then "xxxx.h" and "yyyy.h" was already in "sdk_precomp.h"
If CB_PRECOMP is NOT defined, then we should put "xxxx.h" and "yyyy.h" in the #ifndef branch.
Now, I see that "prep.h" is always included in "sdk_precomp.h" whether CB_PRECOMP is defined or not , so I think
1, we don't need to put #include<prep.h> in the #ifndef branch.
2, for consistency, I think all the cpp file should #include "sdk_precomp.h" instead of #include "<prep.h".
So, here is the patch. (in Git style)
62efccccce054184a60d50417ff461f4dd639cf5
src/sdk/cbauibook.cpp | 1 -
src/sdk/cbstyledtextctrl.cpp | 1 -
src/sdk/macrosmanager.cpp | 2 +-
src/sdk/nullptr.cpp | 2 +-
src/sdk/pluginsconfigurationdlg.cpp | 1 -
5 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/src/sdk/cbauibook.cpp b/src/sdk/cbauibook.cpp
index d355c7b..1ada6f1 100644
--- a/src/sdk/cbauibook.cpp
+++ b/src/sdk/cbauibook.cpp
@@ -11,7 +11,6 @@
#include "sdk_precomp.h"
#ifndef CB_PRECOMP
- #include "prep.h"
#include "cbauibook.h"
#include "manager.h"
#include "configmanager.h"
diff --git a/src/sdk/cbstyledtextctrl.cpp b/src/sdk/cbstyledtextctrl.cpp
index 7570d0d..e681604 100644
--- a/src/sdk/cbstyledtextctrl.cpp
+++ b/src/sdk/cbstyledtextctrl.cpp
@@ -20,7 +20,6 @@
#include <wx/timer.h>
#include "editorbase.h" // DisplayContextMenu
- #include "prep.h" // platform::gtk
#include "pluginmanager.h"
#endif
diff --git a/src/sdk/macrosmanager.cpp b/src/sdk/macrosmanager.cpp
index 21389a4..f400651 100644
--- a/src/sdk/macrosmanager.cpp
+++ b/src/sdk/macrosmanager.cpp
@@ -33,7 +33,7 @@
#include "scripting/sqplus/sqplus.h"
#include "scripting/bindings/scriptbindings.h"
-#include "prep.h"
+
#include "cbstyledtextctrl.h"
using namespace std;
diff --git a/src/sdk/nullptr.cpp b/src/sdk/nullptr.cpp
index 4c36473..5c83259 100644
--- a/src/sdk/nullptr.cpp
+++ b/src/sdk/nullptr.cpp
@@ -7,7 +7,7 @@
* $HeadURL$
*/
-#include <prep.h>
+#include "sdk_precomp.h"
/* -----------------------------------------------
* remove this once the compiler supports C++0x
diff --git a/src/sdk/pluginsconfigurationdlg.cpp b/src/sdk/pluginsconfigurationdlg.cpp
index ac73acb..21daacf 100644
--- a/src/sdk/pluginsconfigurationdlg.cpp
+++ b/src/sdk/pluginsconfigurationdlg.cpp
@@ -26,7 +26,6 @@
#endif
#include "annoyingdialog.h"
-#include "prep.h"
#include <wx/dirdlg.h>
#include <wx/filedlg.h>
#include <wx/html/htmlwin.h>