Removes some CryAssert methods that are not being used because we redirected it all to AZ_Assert

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
Esteban Papp
2021-11-19 19:00:25 -08:00
parent 03543a9e8e
commit c00d3105c6
19 changed files with 10 additions and 1130 deletions
-15
View File
@@ -166,18 +166,3 @@
#ifdef LoadCursor
#undef LoadCursor
#endif
#ifdef _DEBUG
#if !defined(AZ_PLATFORM_LINUX)
#ifdef assert
#undef assert
#if defined(USE_AZ_ASSERT)
#define assert(condition) AZ_Assert(condition, "")
#else
#define assert CRY_ASSERT
#endif
#endif // !defined(AZ_PLATFORM_LINUX)
#endif
#endif
-16
View File
@@ -37,26 +37,10 @@ namespace SandboxEditor
bool StartupTraceHandler::OnPreAssert(const char* fileName, int line, const char* func, const char* message)
{
// Asserts are more fatal than errors, and need to be displayed right away.
// After the assert occurs, nothing else may be functional enough to collect and display messages.
// Only use Cry message boxes if we aren't using native dialog boxes
#ifndef USE_AZ_ASSERT
if (message == nullptr || message[0] == 0)
{
AZStd::string emptyText = AZStd::string::format("Assertion failed in %s %s:%i", func, fileName, line);
OnMessage(emptyText.c_str(), nullptr, MessageDisplayBehavior::AlwaysShow);
}
else
{
OnMessage(message, nullptr, MessageDisplayBehavior::AlwaysShow);
}
#else
AZ_UNUSED(fileName);
AZ_UNUSED(line);
AZ_UNUSED(func);
AZ_UNUSED(message);
#endif // !USE_AZ_ASSERT
// Return false so other listeners can handle this. The StartupTraceHandler won't report messages
// will probably crash before that occurs, because this is an assert.
-3
View File
@@ -6,9 +6,6 @@
*
*/
#include "ColorUtils.h"
// Qt
#include <QColor>
+3 -4
View File
@@ -169,13 +169,12 @@ void CMemoryBlock::Uncompress(CMemoryBlock& toBlock) const
assert(this != &toBlock);
toBlock.Allocate(m_uncompressedSize);
toBlock.m_uncompressedSize = 0;
unsigned long destSize = m_uncompressedSize;
#if !defined(NDEBUG)
int result =
#endif
uncompress((unsigned char*)toBlock.GetBuffer(), &destSize, (unsigned char*)GetBuffer(), GetSize());
unsigned long destSize = m_uncompressedSize;
int result = uncompress((unsigned char*)toBlock.GetBuffer(), &destSize, (unsigned char*)GetBuffer(), GetSize());
assert(result == Z_OK);
assert(destSize == static_cast<unsigned long>(m_uncompressedSize));
#endif
}
//////////////////////////////////////////////////////////////////////////