Merge pull request #7942 from andyque/deleteRedundantCode

remove dead code
This commit is contained in:
minggo 2014-09-04 13:45:12 +08:00
commit 659ba68199
1 changed files with 6 additions and 18 deletions

View File

@ -314,17 +314,13 @@ void ActionNode::initWithDictionary(const rapidjson::Value& dic, Ref* root)
void ActionNode::initActionNodeFromRoot(Ref* root) void ActionNode::initActionNodeFromRoot(Ref* root)
{ {
Node* rootNode = dynamic_cast<Node*>(root); Widget* rootWidget = dynamic_cast<Widget*>(root);
if (rootNode != nullptr) if (rootWidget != nullptr)
{ {
Widget* rootWidget = dynamic_cast<Widget*>(root); Widget* widget = Helper::seekActionWidgetByActionTag(rootWidget, getActionTag());
if (rootWidget != nullptr) if (widget != nullptr)
{ {
Widget* widget = Helper::seekActionWidgetByActionTag(rootWidget, getActionTag()); setObject(widget);
if (widget != nullptr)
{
setObject(widget);
}
} }
} }
} }
@ -367,14 +363,6 @@ Node* ActionNode::getActionNode()
{ {
return cNode; return cNode;
} }
else
{
Widget* rootWidget = dynamic_cast<Widget*>(_object);
if (rootWidget != nullptr)
{
return rootWidget;
}
}
return nullptr; return nullptr;
} }