From 8712ce09e8f3a86dcf2f6c8ee7d030e3b41a4618 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Tue, 10 Feb 2009 23:35:30 +0100 Subject: Use string::empty() instead of comparing to "" --- src/resources/spritedef.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/resources/spritedef.cpp') diff --git a/src/resources/spritedef.cpp b/src/resources/spritedef.cpp index af3281be..20c79e73 100644 --- a/src/resources/spritedef.cpp +++ b/src/resources/spritedef.cpp @@ -321,7 +321,7 @@ SpriteDef::~SpriteDef() SpriteAction SpriteDef::makeSpriteAction(const std::string &action) { - if (action == "" || action == "default") { + if (action.empty() || action == "default") { return ACTION_DEFAULT; } if (action == "stand") { @@ -373,7 +373,7 @@ SpriteAction SpriteDef::makeSpriteAction(const std::string &action) SpriteDirection SpriteDef::makeSpriteDirection(const std::string& direction) { - if (direction == "" || direction == "default") { + if (direction.empty() || direction == "default") { return DIRECTION_DEFAULT; } else if (direction == "up") { -- cgit v1.2.3-70-g09d2