change std::string compare method

This commit is contained in:
yinkaile 2013-12-24 11:05:53 +08:00
parent 4de3e520d8
commit ff053e71fe
1 changed files with 3 additions and 3 deletions

View File

@ -125,7 +125,7 @@ bool Armature::init(const std::string& name)
ArmatureDataManager *armatureDataManager = ArmatureDataManager::getInstance();
if(_name.length() != 0)
if(!_name.empty())
{
AnimationData *animationData = armatureDataManager->getAnimationData(name);
CCASSERT(animationData, "AnimationData not exist! ");
@ -236,7 +236,7 @@ void Armature::addBone(Bone *bone, const std::string& parentName)
CCASSERT( bone != nullptr, "Argument must be non-nil");
CCASSERT(_boneDic.at(bone->getName()) == nullptr, "bone already added. It can't be added again");
if ("" != parentName)
if (!parentName.empty())
{
Bone *boneParent = _boneDic.at(parentName);
if (boneParent)
@ -292,7 +292,7 @@ void Armature::changeBoneParent(Bone *bone, const std::string& parentName)
bone->setParentBone(nullptr);
}
if (parentName != "")
if (!parentName.empty())
{
Bone *boneParent = _boneDic.at(parentName);