mail[Wesnoth-commits] r20128 - /trunk/src/font.cpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by koraq on September 05, 2007 - 19:01:
Author: mordante
Date: Wed Sep  5 19:00:32 2007
New Revision: 20128

URL: http://svn.gna.org/viewcvs/wesnoth?rev=20128&view=rev
Log:
C-style cast cleanup. 

Modified:
    trunk/src/font.cpp

Modified: trunk/src/font.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/font.cpp?rev=20128&r1=20127&r2=20128&view=diff
==============================================================================
--- trunk/src/font.cpp (original)
+++ trunk/src/font.cpp Wed Sep  5 19:00:32 2007
@@ -135,7 +135,7 @@
                                current_chunk.ucs2_text.clear();
                                current_chunk.subset = font_map[size_t(*ch)];
                        }
-                       current_chunk.ucs2_text.push_back((Uint16)*ch);
+                       
current_chunk.ucs2_text.push_back(static_cast<Uint16>(*ch));
                        current_chunk.text.append(ch.substr().first, 
ch.substr().second);
                }
                if (!current_chunk.text.empty()) {
@@ -467,7 +467,8 @@
                        itor->ucs2_text.push_back(0);
                }
 
-               TTF_SizeUNICODE(ttfont, (Uint16 const 
*)&(itor->ucs2_text.front()), &w, &h);
+               TTF_SizeUNICODE(ttfont, 
+                       static_cast<Uint16 const 
*>(&(itor->ucs2_text.front())), &w, &h);
                w_ += w;
                h_ = maximum<int>(h_, h);
        }
@@ -512,7 +513,8 @@
                        continue;
                font_style_setter const style_setter(ttfont, style_);
 
-               surface s = surface(TTF_RenderUNICODE_Blended(ttfont, (Uint16 
const *)&(itor->ucs2_text.front()), color_));
+               surface s = surface(TTF_RenderUNICODE_Blended(ttfont, 
+                       static_cast<Uint16 const 
*>(&(itor->ucs2_text.front())), color_));
                if(!s.null())
                        surfs_.push_back(s);
        }




Related Messages


Powered by MHonArc, Updated Wed Sep 05 19:20:19 2007