empiredan commented on code in PR #1491:
URL:
https://github.com/apache/incubator-pegasus/pull/1491#discussion_r1209667757
##########
src/utils/enum_helper.h:
##########
@@ -66,6 +66,11 @@
#define ENUM_END(type) ENUM_END2(type, type)
+#define ENUM_CONST(str) k##str
+#define ENUM_CONST_DEF(str) ENUM_CONST(str),
+#define ENUM_CONST_REG_STR(enum_class, str)
\
+ helper->register_enum(#str, enum_class::ENUM_CONST(str));
Review Comment:
OK, I'll add some test cases.
##########
src/utils/enum_helper.h:
##########
@@ -66,6 +66,11 @@
#define ENUM_END(type) ENUM_END2(type, type)
+#define ENUM_CONST(str) k##str
+#define ENUM_CONST_DEF(str) ENUM_CONST(str),
+#define ENUM_CONST_REG_STR(enum_class, str)
\
+ helper->register_enum(#str, enum_class::ENUM_CONST(str));
Review Comment:
OK, I'll add some sample comments to describe how to use these macros.
##########
src/replica/test/replica_disk_test_base.h:
##########
@@ -57,7 +57,6 @@ class replica_disk_test_base : public replica_test_base
generate_mock_app_info();
stub->_fs_manager._dir_nodes.clear();
- stub->_fs_manager.reset_disk_stat();
Review Comment:
Actually this resulted from rebasing `master` branch. In
[master](https://github.com/apache/incubator-pegasus/blob/master/src/replica/test/replica_disk_test_base.h#L60)
branch, this line was newly added, while it has been removed in
`migrate-metrics-dev` branch. After rebasing, `migrate-metrics-dev` has this
line which should have been dropped.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]