mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-04-24 10:38:53 +00:00
Change OPTICK_VERIFY to print error and continue, also fix Optick unreachable code
This commit is contained in:
parent
2dd185dd69
commit
7183e8707b
4 changed files with 4 additions and 8 deletions
|
@ -71,7 +71,7 @@
|
|||
#define OPTICK_ENABLE_GPU_VULKAN (OPTICK_ENABLE_GPU /*&& 0*/)
|
||||
#endif
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Vulkan Functions
|
||||
// Vulkan Functions - static+dynamic (1) or dynamic linking only (0)
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
#if !defined(OPTICK_STATIC_VULKAN_FUNCTIONS)
|
||||
#define OPTICK_STATIC_VULKAN_FUNCTIONS (0 /*1*/)
|
||||
|
|
|
@ -148,7 +148,7 @@ static const ProcessID INVALID_PROCESS_ID = (ProcessID)-1;
|
|||
#else
|
||||
#define OPTICK_ASSERT(arg, description)
|
||||
#define OPTICK_FAILED(description) { throw std::runtime_error(description); }
|
||||
#define OPTICK_VERIFY(arg, description, operation) if (!(arg)) { OPTICK_FAILED(description); operation; }
|
||||
#define OPTICK_VERIFY(arg, description, operation) if (!(arg)) { printf("%s\n", description); operation; }
|
||||
#endif
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
|
|
@ -240,7 +240,7 @@ EventDescription::EventDescription() : name(""), file(""), line(0), index((uint3
|
|||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
EventDescription& EventDescription::operator=(const EventDescription&)
|
||||
{
|
||||
OPTICK_FAILED("It is pointless to copy EventDescription. Please, check you logic!"); return *this;
|
||||
OPTICK_VERIFY( false, "It is pointless to copy EventDescription. Please, check your logic!", return *this );
|
||||
}
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
EventData* Event::Start(const EventDescription& description)
|
||||
|
|
|
@ -91,11 +91,7 @@ public:
|
|||
|
||||
IMessage* result = factory[messageType](str);
|
||||
|
||||
if (header.length + str.Length() != length)
|
||||
{
|
||||
OPTICK_FAILED("Message Stream is corrupted! Invalid Protocol?")
|
||||
return nullptr;
|
||||
}
|
||||
OPTICK_VERIFY( header.length + str.Length() == length, "Message Stream is corrupted! Invalid Protocol?", return nullptr );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue