aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorMax Horn2006-07-23 15:08:48 +0000
committerMax Horn2006-07-23 15:08:48 +0000
commit4fcdbb93497d30de4c0fc606b3bbddeabdbb4746 (patch)
tree9c6b98d81c004a191e0c00fa8651e02eab98e593 /gui
parent602548cea32612c791ba1951e21f0bdc87ae616d (diff)
downloadscummvm-rg350-4fcdbb93497d30de4c0fc606b3bbddeabdbb4746.tar.gz
scummvm-rg350-4fcdbb93497d30de4c0fc606b3bbddeabdbb4746.tar.bz2
scummvm-rg350-4fcdbb93497d30de4c0fc606b3bbddeabdbb4746.zip
String class usage cleanup
svn-id: r23582
Diffstat (limited to 'gui')
-rw-r--r--gui/ThemeClassic.cpp2
-rw-r--r--gui/ThemeNew.cpp4
-rw-r--r--gui/newgui.cpp2
3 files changed, 4 insertions, 4 deletions
diff --git a/gui/ThemeClassic.cpp b/gui/ThemeClassic.cpp
index 9c36463fd2..babb03b24d 100644
--- a/gui/ThemeClassic.cpp
+++ b/gui/ThemeClassic.cpp
@@ -296,7 +296,7 @@ void ThemeClassic::drawPopUpWidget(const Common::Rect &r, const Common::String &
_screen.drawLine(p0.x, p1.y, p1.x, p1.y, color);
}
- if (sel != "") {
+ if (!sel.empty()) {
Common::Rect text(r.left + 2, r.top + 3, r.right - 4, r.top + 3 + _font->getFontHeight());
_font->drawString(&_screen, sel, text.left, text.top, text.width(), color, convertAligment(align), deltax, false);
}
diff --git a/gui/ThemeNew.cpp b/gui/ThemeNew.cpp
index e50589f554..b1dd95da72 100644
--- a/gui/ThemeNew.cpp
+++ b/gui/ThemeNew.cpp
@@ -1309,7 +1309,7 @@ const Graphics::Font *ThemeNew::loadFont(const char *filename) {
Common::String cacheFilename = genCacheFilename(filename);
Common::File fontFile;
- if (cacheFilename != "") {
+ if (!cacheFilename.empty()) {
if (fontFile.open(cacheFilename))
font = Graphics::NewFont::loadFromCache(fontFile);
if (font)
@@ -1368,7 +1368,7 @@ const Graphics::Font *ThemeNew::loadFont(const char *filename) {
#endif
if (font) {
- if (cacheFilename != "") {
+ if (!cacheFilename.empty()) {
if (!Graphics::NewFont::cacheFontData(*font, cacheFilename)) {
warning("Couldn't create cache file for font '%s'", filename);
}
diff --git a/gui/newgui.cpp b/gui/newgui.cpp
index 819b6728f7..14aeff06c1 100644
--- a/gui/newgui.cpp
+++ b/gui/newgui.cpp
@@ -60,7 +60,7 @@ GuiObject::GuiObject(const Common::String &name) : _firstWidget(0) {
}
void GuiObject::handleScreenChanged() {
- if (_name != "") {
+ if (!_name.empty()) {
if ((_x = g_gui.evaluator()->getVar(_name + ".x")) == EVAL_UNDEF_VAR)
error("Undefined variable %s.x", _name.c_str());
if ((_y = g_gui.evaluator()->getVar(_name + ".y")) == EVAL_UNDEF_VAR)