diff --git a/include/Nazara/Utility/Buffer.hpp b/include/Nazara/Utility/Buffer.hpp index 1a24e4d9a..b1b0b64b1 100644 --- a/include/Nazara/Utility/Buffer.hpp +++ b/include/Nazara/Utility/Buffer.hpp @@ -54,7 +54,7 @@ class NAZARA_API NzBuffer : public NzResource, NzNonCopyable void Unmap() const; - static bool IsSupported(nzDataStorage storage); + static bool IsStorageSupported(nzDataStorage storage); static void SetBufferFactory(nzDataStorage storage, BufferFactory func); private: diff --git a/src/Nazara/Utility/Buffer.cpp b/src/Nazara/Utility/Buffer.cpp index e05a15db2..c35f8bf70 100644 --- a/src/Nazara/Utility/Buffer.cpp +++ b/src/Nazara/Utility/Buffer.cpp @@ -67,7 +67,7 @@ bool NzBuffer::Create(unsigned int size, nzDataStorage storage, nzBufferUsage us Destroy(); // Notre buffer est-il supporté ? - if (!IsSupported(storage)) + if (!IsStorageSupported(storage)) { NazaraError("Buffer storage not supported"); return false; @@ -212,13 +212,11 @@ bool NzBuffer::SetStorage(nzDataStorage storage) if (m_storage == storage) return true; - #if NAZARA_UTILITY_SAFE - if (!IsSupported(storage)) + if (!IsStorageSupported(storage)) { NazaraError("Storage not supported"); return false; } - #endif void* ptr = m_impl->Map(nzBufferAccess_ReadOnly, 0, m_size); if (!ptr) @@ -271,7 +269,7 @@ void NzBuffer::Unmap() const NazaraWarning("Failed to unmap buffer (it's content may be undefined)"); ///TODO: Unexpected ? } -bool NzBuffer::IsSupported(nzDataStorage storage) +bool NzBuffer::IsStorageSupported(nzDataStorage storage) { return s_bufferFactories[storage] != nullptr; } diff --git a/src/Nazara/Utility/Mesh.cpp b/src/Nazara/Utility/Mesh.cpp index bb588a7ae..ee6489dfc 100644 --- a/src/Nazara/Utility/Mesh.cpp +++ b/src/Nazara/Utility/Mesh.cpp @@ -25,13 +25,13 @@ NzMeshParams::NzMeshParams() { - if (!NzBuffer::IsSupported(storage)) + if (!NzBuffer::IsStorageSupported(storage)) storage = nzDataStorage_Software; } bool NzMeshParams::IsValid() const { - if (!NzBuffer::IsSupported(storage)) + if (!NzBuffer::IsStorageSupported(storage)) { NazaraError("Storage not supported"); return false;