mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-26 07:54:36 +00:00
stop using macro in TRACY_CL_CHECK_ERROR
This commit is contained in:
parent
e28c562a20
commit
f8d231bbc9
@ -48,13 +48,13 @@ using TracyCLCtx = void*;
|
|||||||
TracyMessageL( "TRACY_CL_ASSERT failed on " __FILE__ ":" TRACY_CL_TO_STRING(__LINE__) ); \
|
TracyMessageL( "TRACY_CL_ASSERT failed on " __FILE__ ":" TRACY_CL_TO_STRING(__LINE__) ); \
|
||||||
assert(false && "TRACY_CL_ASSERT failed"); \
|
assert(false && "TRACY_CL_ASSERT failed"); \
|
||||||
}
|
}
|
||||||
#define TRACY_CL_CHECK_ERROR(err) if(err != CL_SUCCESS) { \
|
#define TRACY_CL_CHECK_ERROR(err) if(err != CL_SUCCESS) { \
|
||||||
std::ostringstream oss; \
|
std::ostringstream oss; \
|
||||||
oss << ("TRACY_CL_CHECK_ERROR failed on " __FILE__ ":" TRACY_CL_TO_STRING(__LINE__)) \
|
oss << "TRACY_CL_CHECK_ERROR failed on " << __FILE__ << ":" << __LINE__ \
|
||||||
<< ": error code " << err; \
|
<< ": error code " << err; \
|
||||||
auto msg = oss.str(); \
|
auto msg = oss.str(); \
|
||||||
TracyMessage(msg.data(), msg.size()); \
|
TracyMessage(msg.data(), msg.size()); \
|
||||||
assert(false && "TRACY_CL_CHECK_ERROR failed"); \
|
assert(false && "TRACY_CL_CHECK_ERROR failed"); \
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace tracy {
|
namespace tracy {
|
||||||
|
Loading…
Reference in New Issue
Block a user