diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-02-08 23:02:06 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-02-08 23:02:06 +0300 |
commit | 7e66a4606bb15d98197f71245fe191d03152ee5f (patch) | |
tree | 825022571cfb55d70f1ca3c142f79db3758fb72b /src/gui/widgets | |
parent | a61ac4664d55cddb18d2d861e76629bd07676129 (diff) | |
download | manaverse-7e66a4606bb15d98197f71245fe191d03152ee5f.tar.gz manaverse-7e66a4606bb15d98197f71245fe191d03152ee5f.tar.bz2 manaverse-7e66a4606bb15d98197f71245fe191d03152ee5f.tar.xz manaverse-7e66a4606bb15d98197f71245fe191d03152ee5f.zip |
Improve some empty string checks.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/popup.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/radiobutton.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/scrollarea.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/window.cpp | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/widgets/popup.cpp b/src/gui/widgets/popup.cpp index 2c707b295..bd94236b9 100644 --- a/src/gui/widgets/popup.cpp +++ b/src/gui/widgets/popup.cpp @@ -55,7 +55,7 @@ Popup::Popup(const std::string &name, addWidgetListener(this); - if (skin == "") + if (skin.empty()) skin = "popup.xml"; if (theme) diff --git a/src/gui/widgets/radiobutton.cpp b/src/gui/widgets/radiobutton.cpp index 0f67bc54b..89b9b2341 100644 --- a/src/gui/widgets/radiobutton.cpp +++ b/src/gui/widgets/radiobutton.cpp @@ -315,7 +315,7 @@ void RadioButton::mouseDragged(MouseEvent& event) void RadioButton::setGroup(const std::string &group) { - if (mGroup != "") + if (!mGroup.empty()) { for (GroupIterator iter = mGroupMap.lower_bound(mGroup), iterEnd = mGroupMap.upper_bound(mGroup); diff --git a/src/gui/widgets/scrollarea.cpp b/src/gui/widgets/scrollarea.cpp index 5bf67bfda..d515f3c66 100644 --- a/src/gui/widgets/scrollarea.cpp +++ b/src/gui/widgets/scrollarea.cpp @@ -195,7 +195,7 @@ void ScrollArea::init(std::string skinName) } // +++ here probably need move background from static - if (skinName == "") + if (skinName.empty()) skinName = "scroll_background.xml"; if (theme) { diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp index 450c2e025..886372035 100644 --- a/src/gui/widgets/window.cpp +++ b/src/gui/widgets/window.cpp @@ -174,7 +174,7 @@ Window::Window(const std::string &caption, setPadding(3); setTitleBarHeight(20); - if (skin == "") + if (skin.empty()) skin = "window.xml"; int childPalette = 1; |