Permalink
Browse files

PCH cleanup

- src/component_pch.hh -> src/component/pch.hh, normal inclusion as if no PCH
- PCH removed for ozCore, added for ozEngine
  • Loading branch information...
1 parent fcc7183 commit d17c6ec1ffc159156373f749c23f975af650d696 @ducakar committed Feb 17, 2013
Showing with 250 additions and 90 deletions.
  1. +0 −1 src/builder/Context.cc
  2. +0 −1 src/builder/MD2.cc
  3. +0 −1 src/builder/MD3.cc
  4. +0 −1 src/builder/UI.cc
  5. +0 −1 src/client/Audio.hh
  6. +1 −1 src/client/BSP.cc
  7. +0 −1 src/client/Camera.hh
  8. +0 −1 src/client/Lua.hh
  9. +1 −1 src/client/Render.cc
  10. +1 −0 src/client/Window.cc
  11. +0 −2 src/client/ui/BuildMenu.cc
  12. +0 −1 src/client/ui/CreditsMenu.cc
  13. +0 −2 src/client/ui/DebugFrame.cc
  14. +0 −1 src/client/ui/GalileoFrame.cc
  15. +0 −1 src/client/ui/Label.cc
  16. +0 −1 src/client/ui/LoadingArea.cc
  17. +0 −1 src/client/ui/MainMenu.cc
  18. +0 −1 src/client/ui/MissionMenu.cc
  19. +0 −1 src/client/ui/Mouse.cc
  20. +0 −1 src/client/ui/QuestFrame.cc
  21. +0 −1 src/client/ui/SettingsFrame.cc
  22. +0 −1 src/client/ui/Text.cc
  23. +3 −5 src/modules/flora/FloraModule.cc
  24. +1 −1 src/nirvana/Mind.hh
  25. +4 −1 src/ozCore/Alloc.cc
  26. +1 −1 src/ozCore/Buffer.cc
  27. +0 −3 src/ozCore/CMakeLists.txt
  28. +1 −1 src/ozCore/File.cc
  29. +2 −2 src/ozCore/Gettext.cc
  30. +7 −1 src/ozCore/JSON.cc
  31. +1 −1 src/ozCore/Log.cc
  32. +1 −1 src/ozCore/Mat33.cc
  33. +1 −1 src/ozCore/Mat44.cc
  34. +1 −1 src/ozCore/Math.cc
  35. +20 −8 src/ozCore/Math.hh
  36. +3 −1 src/ozCore/Mutex.cc
  37. +1 −1 src/ozCore/Point.cc
  38. +1 −1 src/ozCore/Quat.cc
  39. +3 −1 src/ozCore/Semaphore.cc
  40. +4 −1 src/ozCore/StackTrace.cc
  41. +3 −0 src/ozCore/StackTrace.hh
  42. +4 −1 src/ozCore/String.cc
  43. +4 −1 src/ozCore/System.cc
  44. +3 −1 src/ozCore/Thread.cc
  45. +1 −1 src/ozCore/Time.cc
  46. +1 −1 src/ozCore/Vec3.cc
  47. +1 −1 src/ozCore/Vec4.cc
  48. +3 −1 src/ozCore/common.cc
  49. +1 −1 src/ozCore/config.hh.in
  50. +0 −1 src/ozCore_pch.cc
  51. +0 −1 src/ozCore_pch.hh
  52. +3 −1 src/ozDynamics/CMakeLists.txt
  53. +1 −2 src/ozDynamics/collision/AABB.hh
  54. +1 −1 src/ozDynamics/collision/Body.cc
  55. +1 −1 src/ozDynamics/collision/Box.cc
  56. +1 −1 src/ozDynamics/collision/Capsule.cc
  57. +1 −1 src/ozDynamics/collision/Collider.cc
  58. +1 −1 src/ozDynamics/collision/Compound.cc
  59. +1 −1 src/ozDynamics/collision/Mesh.cc
  60. +1 −1 src/ozDynamics/collision/Shape.cc
  61. +1 −1 src/ozDynamics/collision/Space.cc
  62. +1 −0 src/ozDynamics/common.cc
  63. +30 −0 src/ozDynamics/common.hh
  64. +29 −0 src/ozDynamics/pch.cc
  65. +29 −0 src/ozDynamics/pch.hh
  66. +1 −1 src/ozDynamics/physics/DBody.cc
  67. +3 −1 src/ozDynamics/physics/Physics.cc
  68. +0 −1 src/ozDynamics_pch.cc
  69. +0 −1 src/ozDynamics_pch.hh
  70. +1 −1 src/ozEngine/CMakeLists.txt
  71. +1 −2 src/ozEngine/common.hh
  72. +29 −0 src/ozEngine/pch.cc
  73. +30 −0 src/ozEngine/pch.hh
  74. +0 −1 src/ozEngine_pch.cc
  75. +0 −1 src/ozEngine_pch.hh
  76. +5 −5 src/tests/CMakeLists.txt
View
@@ -30,7 +30,6 @@
#include <client/MD2Imago.hh>
#include <client/MD2WeaponImago.hh>
#include <client/MD3Imago.hh>
-
#include <client/BasicAudio.hh>
#include <client/BotAudio.hh>
#include <client/VehicleAudio.hh>
View
@@ -26,7 +26,6 @@
#include <client/MD2.hh>
#include <client/Context.hh>
-
#include <builder/Compiler.hh>
namespace oz
View
@@ -25,7 +25,6 @@
#include <builder/MD3.hh>
#include <client/Context.hh>
-
#include <builder/Compiler.hh>
namespace oz
View
@@ -25,7 +25,6 @@
#include <builder/UI.hh>
#include <client/ui/Mouse.hh>
-
#include <builder/Context.hh>
namespace oz
View
@@ -26,7 +26,6 @@
#pragma once
#include <matrix/Vehicle.hh>
-
#include <client/common.hh>
namespace oz
View
@@ -25,8 +25,8 @@
#include <client/BSP.hh>
#include <client/Context.hh>
+#include <client/SMM.hh>
#include <client/OpenGL.hh>
-#include "SMM.hh"
namespace oz
{
View
@@ -24,7 +24,6 @@
#pragma once
#include <matrix/Vehicle.hh>
-
#include <client/StrategicProxy.hh>
#include <client/UnitProxy.hh>
#include <client/CinematicProxy.hh>
View
@@ -26,7 +26,6 @@
#pragma once
#include <common/Lua.hh>
-
#include <client/common.hh>
namespace oz
View
@@ -788,8 +788,8 @@ Render render;
*/
#include <ozDynamics/ozDynamics.hh>
-#include "Input.hh"
#include <common/Timer.hh>
+#include <client/Input.hh>
namespace oz
{
View
@@ -23,6 +23,7 @@
#include <stable.hh>
#include <client/Window.hh>
+
#include <client/Input.hh>
#include <client/OpenGL.hh>
#include <client/NaClPlatform.hh>
@@ -26,9 +26,7 @@
#include <matrix/Liber.hh>
#include <matrix/Synapse.hh>
-
#include <nirvana/Nirvana.hh>
-
#include <client/Camera.hh>
namespace oz
@@ -30,7 +30,6 @@
#include <client/Input.hh>
#include <client/OpenGL.hh>
#include <client/NaClPlatform.hh>
-
#include <client/ui/Style.hh>
#include <client/ui/Button.hh>
@@ -25,9 +25,7 @@
#include <client/ui/DebugFrame.hh>
#include <matrix/Collider.hh>
-
#include <client/Camera.hh>
-
#include <client/ui/Style.hh>
namespace oz
@@ -29,7 +29,6 @@
#include <client/Context.hh>
#include <client/QuestList.hh>
#include <client/OpenGL.hh>
-
#include <client/ui/Style.hh>
namespace oz
View
@@ -27,7 +27,6 @@
#include <client/Shader.hh>
#include <client/Shape.hh>
#include <client/OpenGL.hh>
-
#include <client/ui/Area.hh>
#include <client/ui/Style.hh>
@@ -26,7 +26,6 @@
#include <client/Shape.hh>
#include <client/Camera.hh>
-
#include <client/ui/Style.hh>
namespace oz
@@ -30,7 +30,6 @@
#include <client/MenuStage.hh>
#include <client/OpenGL.hh>
#include <client/BuildInfo.hh>
-
#include <client/ui/Style.hh>
#include <client/ui/MissionMenu.hh>
#include <client/ui/SettingsFrame.hh>
@@ -31,7 +31,6 @@
#include <client/Input.hh>
#include <client/OpenGL.hh>
#include <client/NaClPlatform.hh>
-
#include <client/ui/Style.hh>
namespace oz
View
@@ -30,7 +30,6 @@
#include <client/Window.hh>
#include <client/Input.hh>
#include <client/OpenGL.hh>
-
#include <client/ui/Area.hh>
namespace oz
@@ -25,7 +25,6 @@
#include <client/ui/QuestFrame.hh>
#include <client/Camera.hh>
-
#include <client/ui/Style.hh>
namespace oz
@@ -27,7 +27,6 @@
#include <client/Shape.hh>
#include <client/Camera.hh>
#include <client/OpenGL.hh>
-
#include <client/ui/Style.hh>
#include <client/ui/MainMenu.hh>
#include <client/ui/UI.hh>
View
@@ -27,7 +27,6 @@
#include <client/Shader.hh>
#include <client/Shape.hh>
#include <client/OpenGL.hh>
-
#include <client/ui/Style.hh>
#include <client/ui/Area.hh>
@@ -24,20 +24,18 @@
#include <stable.hh>
#include <modules/flora/FloraModule.hh>
+#include <common/luabase.hh>
#include <matrix/Liber.hh>
#include <matrix/Synapse.hh>
-
#include <client/Lua.hh>
-#include <common/luabase.hh>
-
-using namespace oz::client;
-
namespace oz
{
namespace modules
{
+using oz::client::lua;
+
// plants/m2
const float FloraModule::DENSITY = 0.04f;
// dim * SPACING
View
@@ -23,7 +23,7 @@
#pragma once
-#include <nirvana/common.hh>
+#include <nirvana/Task.hh>
namespace oz
{
View
@@ -24,7 +24,10 @@
* @file ozCore/Alloc.cc
*/
-#include "ozCore.hh"
+#include "Alloc.hh"
+
+#include "System.hh"
+#include "Log.hh"
#include <cstdlib>
#include <malloc.h>
View
@@ -24,7 +24,7 @@
* @file ozCore/Buffer.cc
*/
-#include "ozCore.hh"
+#include "Buffer.hh"
namespace oz
{
@@ -90,9 +90,6 @@ endif()
set_target_properties( ozCore PROPERTIES VERSION ${OZ_VERSION} SOVERSION 0 )
-add_pch( ozCore_pch ../ozCore_pch.hh ../ozCore_pch.cc )
-use_pch( ozCore ozCore_pch )
-
install( TARGETS ozCore
RUNTIME DESTINATION bin${OZ_BINARY_SUBDIR}
LIBRARY DESTINATION lib${OZ_BINARY_SUBDIR}
View
@@ -24,7 +24,7 @@
* @file ozCore/File.cc
*/
-#include "ozCore.hh"
+#include "File.hh"
#if defined( __native_client__ )
# include <ppapi/c/pp_file_info.h>
View
@@ -24,7 +24,7 @@
* @file ozCore/Gettext.cc
*/
-#include "ozCore.hh"
+#include "Gettext.hh"
namespace oz
{
@@ -199,7 +199,7 @@ bool Gettext::import( const File& file )
delete[] table;
table = new Message*[nMessages];
- aFill<Message*>( table, nullptr, nMessages );
+ aFill<Message*, Message*>( table, nullptr, nMessages );
for( int i = 0; i < nMessages; ++i ) {
uint index = uint( hash( messages[i].original ) ) % uint( nMessages );
View
@@ -24,7 +24,13 @@
* @file ozCore/JSON.cc
*/
-#include "ozCore.hh"
+#include "JSON.hh"
+
+#include "List.hh"
+#include "SList.hh"
+#include "Map.hh"
+#include "System.hh"
+#include "Log.hh"
#include <cstring>
View
@@ -24,7 +24,7 @@
* @file ozCore/Log.cc
*/
-#include "ozCore.hh"
+#include "Log.hh"
#include <cstdio>
#include <cstdlib>
View
@@ -24,7 +24,7 @@
* @file ozCore/Mat33.cc
*/
-#include "ozCore.hh"
+#include "Mat33.hh"
namespace oz
{
View
@@ -24,7 +24,7 @@
* @file ozCore/Mat44.cc
*/
-#include "ozCore.hh"
+#include "Mat44.hh"
namespace oz
{
View
@@ -24,7 +24,7 @@
* @file ozCore/Math.cc
*/
-#include "ozCore.hh"
+#include "Math.hh"
#include <cstdlib>
View
@@ -288,7 +288,7 @@ class Math
static void sincos( float x, float* s, float* c )
{
// No need to use sincosf(). GCC optimises the following calls into one sincosf() call and
- // LLVM/Clang is missing built-in for sincosf().
+ // LLVM/Clang is missing built-ins for sincosf().
*s = __builtin_sinf( x );
*c = __builtin_cosf( x );
}
@@ -348,9 +348,13 @@ class Math
OZ_ALWAYS_INLINE
static bool isFinite( float x )
{
- // isfinite() is broken in GCC with -ffinite-math-only (implied by -ffast-math).
- // Furthermore, this expression is faster.
+ // isfinite() is broken and NaN = NaN in GCC with -ffinite-math-only (implied by -ffast-math).
+ // Furthermore, those expressions are faster than __builtin_isfinite().
+#if defined( OZ_GCC ) && defined( __FINITE_MATH_ONLY__ )
return x + 1.0e38f != x && x == x;
+#else
+ return x + 1.0e38f != x;
+#endif
}
/**
@@ -359,9 +363,13 @@ class Math
OZ_ALWAYS_INLINE
static bool isInf( float x )
{
- // isinf() is broken in GCC with -ffinite-math-only (implied by -ffast-math).
- // Furthermore, this expression is faster.
+ // isinf() is broken and NaN = NaN in GCC with -ffinite-math-only (implied by -ffast-math).
+ // Furthermore, those expressions are faster than __builtin_isinf().
+#if defined( OZ_GCC ) && defined( __FINITE_MATH_ONLY__ )
return x + 1.0e38f == x && x * 0.0f != x;
+#else
+ return x + 1.0e38f == x;
+#endif
}
/**
@@ -370,9 +378,13 @@ class Math
OZ_ALWAYS_INLINE
static bool isNaN( float x )
{
- // isnan() is broken in GCC with -ffinite-math-only (implied by -ffast-math).
- // Furthermore, this expression is faster.
- return ( x + 1.0e38f == x && x * 0.0f == x ) || x != x;
+ // isnan() is broken and NaN = NaN in GCC with -ffinite-math-only (implied by -ffast-math).
+ // Furthermore, those expressions are faster than __builtin_isnan().
+#if defined( OZ_GCC ) && defined( __FINITE_MATH_ONLY__ )
+ return x + 1.0e38f == x && x * 0.0f == x;
+#else
+ return x != x;
+#endif
}
/**
View
@@ -24,7 +24,9 @@
* @file ozCore/Mutex.cc
*/
-#include "ozCore.hh"
+#include "Mutex.hh"
+
+#include "System.hh"
#include <cstdlib>
Oops, something went wrong.

0 comments on commit d17c6ec

Please sign in to comment.