diff options
Diffstat (limited to '')
-rw-r--r-- | Tools/QtBiomeVisualiser/ChunkCache.cpp | 6 | ||||
-rw-r--r-- | Tools/QtBiomeVisualiser/ChunkLoader.h | 9 | ||||
-rw-r--r-- | Tools/QtBiomeVisualiser/ChunkSource.cpp | 2 | ||||
-rw-r--r-- | Tools/QtBiomeVisualiser/ChunkSource.h | 2 |
4 files changed, 14 insertions, 5 deletions
diff --git a/Tools/QtBiomeVisualiser/ChunkCache.cpp b/Tools/QtBiomeVisualiser/ChunkCache.cpp index 05c267d30..bd8ade304 100644 --- a/Tools/QtBiomeVisualiser/ChunkCache.cpp +++ b/Tools/QtBiomeVisualiser/ChunkCache.cpp @@ -37,14 +37,14 @@ ChunkPtr ChunkCache::fetch(int a_ChunkX, int a_ChunkZ) // If the chunk is in cache but not valid, it means it has been already queued for rendering, do nothing now: if (res != nullptr) { - return ChunkPtr(nullptr); + return ChunkPtr(); } // There's no such item in the cache, create it now: res = new ChunkPtr(new Chunk); if (res == nullptr) { - return ChunkPtr(nullptr); + return ChunkPtr(); } { QMutexLocker lock(&m_Mtx); @@ -55,7 +55,7 @@ ChunkPtr ChunkCache::fetch(int a_ChunkX, int a_ChunkZ) queueChunkRender(a_ChunkX, a_ChunkZ, *res); // Return failure, the chunk is not yet rendered: - return ChunkPtr(nullptr); + return ChunkPtr(); } diff --git a/Tools/QtBiomeVisualiser/ChunkLoader.h b/Tools/QtBiomeVisualiser/ChunkLoader.h index 4d026a45e..e6eb80cbf 100644 --- a/Tools/QtBiomeVisualiser/ChunkLoader.h +++ b/Tools/QtBiomeVisualiser/ChunkLoader.h @@ -7,6 +7,15 @@ +#if (!defined(_MSC_VER) && (__cplusplus < 201103L)) + // GCC in non-c++11 mode doesn't have the "override" keyword + #define override +#endif + + + + + // fwd: class Chunk; typedef std::shared_ptr<Chunk> ChunkPtr; diff --git a/Tools/QtBiomeVisualiser/ChunkSource.cpp b/Tools/QtBiomeVisualiser/ChunkSource.cpp index c5cde1c3b..c3e29c0a2 100644 --- a/Tools/QtBiomeVisualiser/ChunkSource.cpp +++ b/Tools/QtBiomeVisualiser/ChunkSource.cpp @@ -260,7 +260,7 @@ AnvilSource::AnvilFilePtr AnvilSource::getAnvilFile(int a_ChunkX, int a_ChunkZ) // Search the cache for the file: QMutexLocker lock(&m_Mtx); - for (auto itr = m_Files.cbegin(), end = m_Files.cend(); itr != end; ++itr) + for (auto itr = m_Files.begin(), end = m_Files.end(); itr != end; ++itr) { if (((*itr)->m_RegionX == RegionX) && ((*itr)->m_RegionZ == RegionZ)) { diff --git a/Tools/QtBiomeVisualiser/ChunkSource.h b/Tools/QtBiomeVisualiser/ChunkSource.h index 5332c5d3f..65b2c3449 100644 --- a/Tools/QtBiomeVisualiser/ChunkSource.h +++ b/Tools/QtBiomeVisualiser/ChunkSource.h @@ -10,7 +10,7 @@ // fwd: class cBiomeGen; -typedef std::shared_ptr<cBiomeGen> cBiomeGenPtr; +typedef SharedPtr<cBiomeGen> cBiomeGenPtr; class cIniFile; typedef std::shared_ptr<cIniFile> cIniFilePtr; |