summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-10-28 15:44:58 +0100
committerMattes D <github@xoft.cz>2014-10-28 15:44:58 +0100
commitd6c663cbc508859b36543797a7ebbee52a27dc6a (patch)
treec016dffaac4092a61e694ab5dccfd54a06f33e0f /Tools
parentMerge pull request #1573 from mc-server/warningfixes (diff)
downloadcuberite-d6c663cbc508859b36543797a7ebbee52a27dc6a.tar
cuberite-d6c663cbc508859b36543797a7ebbee52a27dc6a.tar.gz
cuberite-d6c663cbc508859b36543797a7ebbee52a27dc6a.tar.bz2
cuberite-d6c663cbc508859b36543797a7ebbee52a27dc6a.tar.lz
cuberite-d6c663cbc508859b36543797a7ebbee52a27dc6a.tar.xz
cuberite-d6c663cbc508859b36543797a7ebbee52a27dc6a.tar.zst
cuberite-d6c663cbc508859b36543797a7ebbee52a27dc6a.zip
Diffstat (limited to '')
-rw-r--r--Tools/QtBiomeVisualiser/ChunkCache.cpp6
-rw-r--r--Tools/QtBiomeVisualiser/ChunkLoader.h9
-rw-r--r--Tools/QtBiomeVisualiser/ChunkSource.cpp2
-rw-r--r--Tools/QtBiomeVisualiser/ChunkSource.h2
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;