diff options
author | Enne Walker <enne.walker@gmail.com> | 2010-05-14 15:28:43 -0400 |
---|---|---|
committer | Enne Walker <enne.walker@gmail.com> | 2010-05-14 18:18:55 -0400 |
commit | 39dd31c724d8e2eeb6cdb479da2cff7c8fa8f5c2 (patch) | |
tree | 85b469f2588408e73f98a77bb9a80c121c7b9078 /crawl-ref/source/fontwrapper-ft.cc | |
parent | 46bd9b7116d87b6ebd461b75deefd767fa96895b (diff) | |
download | crawl-ref-39dd31c724d8e2eeb6cdb479da2cff7c8fa8f5c2.tar.gz crawl-ref-39dd31c724d8e2eeb6cdb479da2cff7c8fa8f5c2.zip |
Clean up storage of vertex colours in GLWRect.
Storing member variable pointers to data, even const ones, is sketchy.
Better to depend on compiler optimizations to eliminate redundant
variable copies.
Diffstat (limited to 'crawl-ref/source/fontwrapper-ft.cc')
-rw-r--r-- | crawl-ref/source/fontwrapper-ft.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crawl-ref/source/fontwrapper-ft.cc b/crawl-ref/source/fontwrapper-ft.cc index 42d4ac4b57..2c37f69b1e 100644 --- a/crawl-ref/source/fontwrapper-ft.cc +++ b/crawl-ref/source/fontwrapper-ft.cc @@ -275,7 +275,7 @@ void FTFontWrapper::render_textblock(unsigned int x_pos, unsigned int y_pos, VColour col(term_colours[col_bg].r, term_colours[col_bg].g, term_colours[col_bg].b); - rect.set_col(&col, &col, &col, &col); + rect.set_col(col); m_buf->add(rect); } @@ -295,7 +295,7 @@ void FTFontWrapper::render_textblock(unsigned int x_pos, unsigned int y_pos, VColour col(term_colours[col_fg].r, term_colours[col_fg].g, term_colours[col_fg].b); - rect.set_col(&col, &col, &col, &col); + rect.set_col(col); rect.set_tex(tex_x, tex_y, tex_x2, tex_y2); m_buf->add(rect); @@ -351,7 +351,7 @@ static void _draw_box(int x_pos, int y_pos, float width, float height, term_colours[box_colour].g, term_colours[box_colour].b, box_alpha); - rect.set_col(&colour, &colour, &colour, &colour); + rect.set_col(colour); buf->add(rect); @@ -655,7 +655,7 @@ void FTFontWrapper::store(FontBuffer &buf, float &x, float &y, GLWRect rect(pos_sx, pos_sy, pos_ex, pos_ey); rect.set_tex(tex_sx, tex_sy, tex_ex, tex_ey); - rect.set_col(&col, &col, &col, &col); + rect.set_col(col); buf.add_primitive(rect); x += m_glyphs[c].advance; |