# HG changeset patch # User rubidium # Date 2009-10-13 19:24:58 # Node ID 33966bc30662b9b2dd2abe2c6414ce8f16b2fe39 # Parent 7ebea9c75ee2ab53fa4ddfa87064117dab18cb0b (svn r17771) -Codechange: use the 'StringID' function instead of the 'const char *' function + custom code to resolve the 'const char *' from the 'StringID' diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp --- a/src/misc_gui.cpp +++ b/src/misc_gui.cpp @@ -841,11 +841,9 @@ void GuiShowTooltips(StringID str, uint 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 */