Removed debug error when copying a matrix

Former-commit-id: 60c57643b5a520abe96fdca83f2d0c28f3bc1f11
This commit is contained in:
Lynix
2012-11-27 20:25:14 +01:00
parent 38c1cf2ad0
commit 4fbe508960
5 changed files with 13 additions and 10 deletions

View File

@@ -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

View File

@@ -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;