mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-10-10 14:21:31 +00:00
Create new assert macro, that can log the values in the expression
* The main motivation for this is because it's convenient to be able to just assert a simple expression rather than print a proper error message, but then after the fact you want to know what the value was (e.g. a return code, or similar).
This commit is contained in:
1 parent
7b8097690d
commit
542131624f
3 files changed
+132
-5
No files matched your search
@@ -82,9 +82,9 @@ float SRGB8_lookuptable[256] = {
|
||||
0.938686f, 0.947307f, 0.955974f, 0.964686f, 0.973445f, 0.982251f, 0.991102f, 1.000000f,
|
||||
};
|
||||
|
||||
void rdcassert(const char *condition, const char *file, unsigned int line, const char *func)
|
||||
void rdcassert(const char *msg, const char *file, unsigned int line, const char *func)
|
||||
{
|
||||
rdclog_int(RDCLog_Error, file, line, "Assertion failed: '%s'", condition, file, line);
|
||||
rdclog_int(RDCLog_Error, file, line, "Assertion failed: %s", msg);
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
||||
Reference in new issue
Block a user