QtBiomeVisualiser: Fixed compilation on Linux.
This commit is contained in:
parent
2d7cbfe620
commit
d6c663cbc5
@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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))
|
||||
{
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user