mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-04 10:41:19 +00:00
C-style cast cleanup.
This commit is contained in:
parent
3221e3beab
commit
e305aca25e
@ -135,7 +135,7 @@ static std::vector<text_chunk> split_text(std::string const & utf8_text) {
|
||||
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 @@ void text_surface::measure() const
|
||||
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 @@ std::vector<surface> const &text_surface::get_surfaces() const
|
||||
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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user