From dcca1694cee1aabd22eec5813e23ed565c609adb Mon Sep 17 00:00:00 2001 From: Amar Takhar Date: Mon, 21 Sep 2009 04:53:51 +0000 Subject: [PATCH] * Follow aegisub and rename wx_pre.h to r_pre.h * Sort headers. * Include missing c/c++ std headers into r_pre.h Originally committed to SVN as r3547. --- aegisub/reporter/Makefile.am | 10 ++++---- aegisub/reporter/main.cpp | 4 ++-- aegisub/reporter/platform_unix_bsd.cpp | 10 ++++---- aegisub/reporter/{wx_pre.h => r_pre.h} | 32 ++++++++++++++++++-------- aegisub/reporter/report.h | 3 ++- aegisub/reporter/sha256.h | 2 ++ aegisub/reporter/upload.h | 4 +++- 7 files changed, 42 insertions(+), 23 deletions(-) rename aegisub/reporter/{wx_pre.h => r_pre.h} (88%) diff --git a/aegisub/reporter/Makefile.am b/aegisub/reporter/Makefile.am index 2f7704efd..b87932303 100644 --- a/aegisub/reporter/Makefile.am +++ b/aegisub/reporter/Makefile.am @@ -4,9 +4,9 @@ AM_CXXFLAGS = bin_PROGRAMS = reporter if PRECOMPILED_HEADER -BUILT_SOURCES = wx_pre.h.gch -AM_CXXFLAGS += -include wx_pre.h -Winvalid-pch -fpch-deps -fpch-preprocess -nodist_reporter_SOURCES = wx_prec.h.gch +BUILT_SOURCES = r_pre.h.gch +AM_CXXFLAGS += -include r_pre.h -Winvalid-pch -fpch-deps -fpch-preprocess +nodist_reporter_SOURCES = r_prec.h.gch endif reporter_CPPFLAGS = -Iinclude @LIBCURL_CFLAGS@ @WX_CPPFLAGS@ @@ -14,8 +14,8 @@ reporter_LDFLAGS = @WX_LIBS@ @LIBCURL_LIBS@ if PRECOMPILED_HEADER # This doesn't depend on Makefile on purpose, you should already know what you're doing when using this. -wx_pre.h.gch: wx_pre.h - @CXX@ @WX_CPPFLAGS@ @CXXFLAGS@ @DEBUG_FLAGS@ wx_pre.h +r_pre.h.gch: r_pre.h + @CXX@ @WX_CPPFLAGS@ @CXXFLAGS@ @DEBUG_FLAGS@ r_pre.h endif diff --git a/aegisub/reporter/main.cpp b/aegisub/reporter/main.cpp index b070c23ec..d043cf564 100644 --- a/aegisub/reporter/main.cpp +++ b/aegisub/reporter/main.cpp @@ -18,6 +18,8 @@ /// @brief Main loop #ifndef R_PRECOMP +#include + #include #include #include @@ -32,8 +34,6 @@ #include #endif -#include - #include "main.h" #include "upload.h" diff --git a/aegisub/reporter/platform_unix_bsd.cpp b/aegisub/reporter/platform_unix_bsd.cpp index 8f472c93c..9d9d50d2c 100644 --- a/aegisub/reporter/platform_unix_bsd.cpp +++ b/aegisub/reporter/platform_unix_bsd.cpp @@ -16,20 +16,22 @@ /// @@file platform_unix_bsd.cpp /// @brief BSD Platform extensions. + #ifndef R_PRECOMP #include #endif -#include "include/platform.h" -#include "platform_unix.h" -#include "platform_unix_bsd.h" - extern "C" { #include #include #include } +#include "include/platform.h" +#include "platform_unix.h" +#include "platform_unix_bsd.h" + + wxString PlatformUnixBSD::CPUId() { char id[300]; size_t len = sizeof(id); diff --git a/aegisub/reporter/wx_pre.h b/aegisub/reporter/r_pre.h similarity index 88% rename from aegisub/reporter/wx_pre.h rename to aegisub/reporter/r_pre.h index 044d72e43..a527a54e5 100644 --- a/aegisub/reporter/wx_pre.h +++ b/aegisub/reporter/r_pre.h @@ -19,33 +19,45 @@ #define R_PRECOMP -#include +// C + System. +#include +#include +// C++ std +#include + +// 3rd party packages. +#include + + +// WX headers +#include #include +#include #include +#include #include #include #include +#include +#include #include #include #include #include +#include #include #include +#include #include #include +#include #include +#include #include +#include #include #include #include +#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include diff --git a/aegisub/reporter/report.h b/aegisub/reporter/report.h index 18efafb2d..3ebabdfbd 100644 --- a/aegisub/reporter/report.h +++ b/aegisub/reporter/report.h @@ -18,11 +18,12 @@ /// @see report.cpp #ifndef R_PRECOMP +#include + #include #include #endif -#include class Report { diff --git a/aegisub/reporter/sha256.h b/aegisub/reporter/sha256.h index 20773f735..e06b79385 100644 --- a/aegisub/reporter/sha256.h +++ b/aegisub/reporter/sha256.h @@ -30,7 +30,9 @@ #ifndef _SHA256_H_ #define _SHA256_H_ +#ifndef R_PRECOMP #include +#endif typedef struct SHA256Context { uint32_t state[8]; diff --git a/aegisub/reporter/upload.h b/aegisub/reporter/upload.h index d81da2c37..55eb82e41 100644 --- a/aegisub/reporter/upload.h +++ b/aegisub/reporter/upload.h @@ -18,9 +18,11 @@ /// @see upload.cpp #ifndef R_PRECMP +#include + #include #endif -#include + #include "progress.h" /// @class Upload