Commit 87d55f0b authored by Martin Marinov's avatar Martin Marinov

Add an user-friendly node name as a parameter tp PROGRESS_DEFINE_NODE and...

Add an user-friendly node name as a parameter tp PROGRESS_DEFINE_NODE and PROGRESS_DEFINE_NODE_CUSTOM.
parent 508445cb
......@@ -233,18 +233,18 @@ private:
} //namespace Progress {
#define PROGRESS_DEFINE_NODE_CUSTOM(TYPE, OPRT, ...) \
#define PROGRESS_DEFINE_NODE_CUSTOM(TYPE, OPRT, NAME, ...) \
BASE_THREAD_LOCAL Progress::Node* Progress::PROGRESS_NODE_NAME(OPRT) = nullptr; \
Progress::Node* Progress::PROGRESS_MAKE_NODE_NAME(OPRT) \
(Progress::Node* _next) \
{ \
static BASE_THREAD_LOCAL TYPE node(#OPRT, _next, \
static BASE_THREAD_LOCAL TYPE node(NAME, _next, \
Node::make_child_list( __VA_ARGS__ ));\
return OPRT##_node = &node; \
}
#define PROGRESS_DEFINE_NODE(OPRT, ...) \
PROGRESS_DEFINE_NODE_CUSTOM(Node, OPRT, ##__VA_ARGS__)
#define PROGRESS_DEFINE_NODE(OPRT, NAME, ...) \
PROGRESS_DEFINE_NODE_CUSTOM(Node, OPRT, NAME, ##__VA_ARGS__)
#if defined(_MSC_VER)
#define __PROGRESS_FUNCTION__ __FUNCTION__ // works in VC well
......
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