[Super-tux-commit] supertux/lib/video font.cpp,1.8,1.9
Brought to you by:
wkendrick
From: Ryan F. <sik...@us...> - 2004-10-08 17:45:22
|
Update of /cvsroot/super-tux/supertux/lib/video In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28657/lib/video Modified Files: font.cpp Log Message: - fixed blackscreen on amd64 (and likely other 64bit archs), thanks to bug hunting done by cibomahto Index: font.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/lib/video/font.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- font.cpp 16 Sep 2004 15:04:16 -0000 1.8 +++ font.cpp 8 Oct 2004 17:45:07 -0000 1.9 @@ -74,12 +74,12 @@ Font::get_text_width(const std::string& text) const { /** Let's calculate the size of the biggest paragraph */ - int l, hl; + std::string::size_type l, hl; hl = 0; l = -1; while(true) { l = text.find("\n", l+1); - if(l == (int)std::string::npos) + if(l == std::string::npos) break; if(hl < l) hl = l; @@ -94,7 +94,7 @@ Font::get_text_height(const std::string& text) const { /** Let's calculate height of the text */ - int l, hh; + std::string::size_type l, hh; hh = h; l = -1; while(true) { @@ -128,7 +128,8 @@ Feel free to replace this hack with a more elegant solution */ char temp[1024]; - unsigned int i, l, y; + std::string::size_type l; + unsigned int i, y; i = y = 0; while(true) |