From 3f78042f456aefb13cb29519760b3377e10e7ee2 Mon Sep 17 00:00:00 2001 From: wraitii Date: Wed, 26 Feb 2014 19:08:03 +0000 Subject: [PATCH] Fix tests and C++11 build. This was SVN commit r14788. --- source/renderer/WaterManager.cpp | 6 ++++-- source/simulation2/system/ComponentTest.h | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/source/renderer/WaterManager.cpp b/source/renderer/WaterManager.cpp index 587269519b..6bc124f4c2 100644 --- a/source/renderer/WaterManager.cpp +++ b/source/renderer/WaterManager.cpp @@ -337,7 +337,8 @@ void WaterManager::CreateSuperfancyInfo(CSimulation2* simulation) // Cache some data to spiral-search for the closest tile that's either coastal or water depending on what we are. // this is insanely faster. - // I use a define because it's more readable and various compilers have annoying (different) warnings otherwise. + // I use a define because it's more readable and C++11 doesn't like this otherwise +#define m_MapSize (ssize_t)m_MapSize ssize_t offset[24] = { -1,1,-m_MapSize,+m_MapSize, -1-m_MapSize,+1-m_MapSize,-1+m_MapSize,1+m_MapSize, -2,2,-2*m_MapSize,2*m_MapSize,-2-m_MapSize,-2+m_MapSize,2-m_MapSize,2+m_MapSize, -1-2*m_MapSize,+1-2*m_MapSize,-1+2*m_MapSize,1+2*m_MapSize, @@ -346,7 +347,8 @@ void WaterManager::CreateSuperfancyInfo(CSimulation2* simulation) 2.0f, 2.0f, 2.0f, 2.0f, 2.236f, 2.236f, 2.236f, 2.236f, 2.236f, 2.236f, 2.236f, 2.236f, 2.828f, 2.828f, 2.828f, 2.828f }; - +#undef m_MapSize + // this creates information for waves and stores it in float arrays. PatchRData then puts it in the vertex info for speed. CVector3D normal; for (size_t j = Zstart; j < Zend; ++j) diff --git a/source/simulation2/system/ComponentTest.h b/source/simulation2/system/ComponentTest.h index bdeb7857f0..9dd0065a85 100644 --- a/source/simulation2/system/ComponentTest.h +++ b/source/simulation2/system/ComponentTest.h @@ -226,7 +226,7 @@ public: { } - virtual void ReloadTerrain() + virtual void ReloadTerrain(bool ReloadWater = true) { } };