Removed debug error when copying a matrix
Former-commit-id: 60c57643b5a520abe96fdca83f2d0c28f3bc1f11
This commit is contained in:
@@ -20,7 +20,7 @@ void NzError(nzErrorType type, const NzString& error, unsigned int line, const c
|
||||
|
||||
#if NAZARA_CORE_EXIT_ON_ASSERT_FAILURE
|
||||
if (type == nzErrorType_AssertFailed)
|
||||
exit(EXIT_FAILURE);
|
||||
std::exit(EXIT_FAILURE);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ NzString NzGetLastSystemError(unsigned int code)
|
||||
|
||||
return error;
|
||||
#elif defined(NAZARA_PLATFORM_POSIX)
|
||||
return strerror(code);
|
||||
return std::strerror(code);
|
||||
#else
|
||||
#error GetLastSystemError is not implemented on this platform
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include <Nazara/Core/Config.hpp>
|
||||
#include <Nazara/Core/Error.hpp>
|
||||
#include <Nazara/Core/ResourceListener.hpp>
|
||||
#include <typeinfo>
|
||||
#include <Nazara/Core/Debug.hpp>
|
||||
|
||||
NzResource::NzResource(bool persistent) :
|
||||
@@ -111,13 +112,13 @@ void NzResource::RemoveResourceReference() const
|
||||
}
|
||||
}
|
||||
|
||||
void NzResource::SetPersistent(bool persistent)
|
||||
void NzResource::SetPersistent(bool persistent, bool checkReferenceCount)
|
||||
{
|
||||
NazaraMutexLock(m_mutex);
|
||||
|
||||
m_resourcePersistent = persistent;
|
||||
|
||||
if (!persistent && m_resourceReferenceCount == 0)
|
||||
if (checkReferenceCount && !persistent && m_resourceReferenceCount == 0)
|
||||
{
|
||||
NazaraMutexUnlock(m_mutex);
|
||||
delete this;
|
||||
|
||||
Reference in New Issue
Block a user