Commit 517ff41d authored by Po-Yen, Chen's avatar Po-Yen, Chen
Browse files

Use macro to delay expansion

parent 1e7557a6
...@@ -68,6 +68,9 @@ class ProfilerOperationRegistry final ...@@ -68,6 +68,9 @@ class ProfilerOperationRegistry final
} }
}; };
#define REGISTER_PROFILER_OPERATION(name, description, operation) \ #define PP_CONCAT(x, y) PP_CONCAT_IMPL(x, y)
static const bool operation_registration_result_##__COUNTER__ = \ #define PP_CONCAT_IMPL(x, y) x##y
#define REGISTER_PROFILER_OPERATION(name, description, operation) \
static const bool PP_CONCAT(operation_registration_result_, __COUNTER__) = \
::ProfilerOperationRegistry::GetInstance().Add(name, description, operation) ::ProfilerOperationRegistry::GetInstance().Add(name, description, operation)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment