Skip to content

Commit

Permalink
Merge pull request #102 from AirtestProject/cy
Browse files Browse the repository at this point in the history
增加对无name属性的节点的缺省显示
  • Loading branch information
yimelia authored Jul 4, 2022
2 parents 21e9b35 + a6ac713 commit 4a9e388
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions cocos2dx-c++/sdk/Private/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ NeteaseNode::~NeteaseNode()
}
catch (const exception&)
{
cout<< "½ÚµãÊÍ·ÅÒì³£";
cout<< "failed";
}
}

Expand Down Expand Up @@ -149,6 +149,9 @@ string NeteaseNode::getName(const char* nodeType)
if (name.compare("") == 0) {
name = desc;
}
if (name.compare("") == 0) {
name = "no-name";
}
return name;
#endif
}
Expand Down Expand Up @@ -202,7 +205,9 @@ void NeteaseNode::setDumpString(Writer<StringBuffer>& writer)
{
int nodeType = getNodeType();
string nodeName = _node->getName();

if (nodeName == "") {
nodeName = "no-name";
}
writer.Key("name");
writer.String(nodeName.c_str());

Expand Down

0 comments on commit 4a9e388

Please sign in to comment.