summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-10-13 19:24:58 +0000
committerrubidium <rubidium@openttd.org>2009-10-13 19:24:58 +0000
commit313fb659433b0af187e04185d0b7875889548372 (patch)
tree6b4006a45ce291da593f438017596c3870e29976 /src
parent210d3cc108156861e461d547d4d1ae4e053b27f0 (diff)
downloadopenttd-313fb659433b0af187e04185d0b7875889548372.tar.xz
(svn r17771) -Codechange: use the 'StringID' function instead of the 'const char *' function + custom code to resolve the 'const char *' from the 'StringID'
Diffstat (limited to 'src')
-rw-r--r--src/misc_gui.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp
index 1b8ccf498..0085e4283 100644
--- a/src/misc_gui.cpp
+++ b/src/misc_gui.cpp
@@ -841,11 +841,9 @@ void GuiShowTooltips(StringID str, uint paramcount, const uint64 params[], bool
if (str == STR_NULL) return;
for (uint i = 0; i != paramcount; i++) SetDParam(i, params[i]);
- char buffer[512];
- GetString(buffer, str, lastof(buffer));
Dimension br;
- br.width = min(GetStringBoundingBox(buffer).width, 194);
+ br.width = min(GetStringBoundingBox(str).width, 194);
br.height = GetStringHeight(str, br.width);
/* increase slightly to have some space around the box */