From 313fb659433b0af187e04185d0b7875889548372 Mon Sep 17 00:00:00 2001 From: rubidium Date: Tue, 13 Oct 2009 19:24:58 +0000 Subject: (svn r17771) -Codechange: use the 'StringID' function instead of the 'const char *' function + custom code to resolve the 'const char *' from the 'StringID' --- src/misc_gui.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src') 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 */ -- cgit v1.2.3-70-g09d2