mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-12 22:39:06 +08:00
Fabric: New nice way to deal with DebugStringConvertible items
Summary: No macros in product code. (Not all callsites are converted yet.) Reviewed By: mdvacca Differential Revision: D7797561 fbshipit-source-id: da899421bf99669a0e0a2b83df6004daf14355c2
This commit is contained in:
committed by
Facebook Github Bot
parent
d9ff1769aa
commit
6e537b000b
@@ -18,6 +18,10 @@ std::string DebugStringConvertible::getDebugChildrenDescription(DebugStringConve
|
||||
std::string childrenString = "";
|
||||
|
||||
for (auto child : getDebugChildren()) {
|
||||
if (!child) {
|
||||
continue;
|
||||
}
|
||||
|
||||
childrenString += child->getDebugDescription(options, depth + 1);
|
||||
}
|
||||
|
||||
@@ -32,6 +36,10 @@ std::string DebugStringConvertible::getDebugPropsDescription(DebugStringConverti
|
||||
std::string propsString = "";
|
||||
|
||||
for (auto prop : getDebugProps()) {
|
||||
if (!prop) {
|
||||
continue;
|
||||
}
|
||||
|
||||
auto name = prop->getDebugName();
|
||||
auto value = prop->getDebugValue();
|
||||
auto children = prop->getDebugPropsDescription(options, depth + 1);
|
||||
|
||||
Reference in New Issue
Block a user