1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-11-11 19:23:01 +00:00

Eliminate VLAs for the benefit of MSVC.

This commit is contained in:
Arthur O'Dwyer
2018-06-27 15:35:45 -07:00
parent 6753cc2e39
commit 62db7ee250
7 changed files with 21 additions and 22 deletions

View File

@@ -360,9 +360,9 @@ void sdltogl(SDL_Surface *txt, glfont_t& f, int ch) {
int theight = next_p2( otheight );
#if CAP_TABFONT
int expanded_data[twidth * theight];
std::vector<int> expanded_data(twidth * theight);
#else
Uint16 expanded_data[twidth * theight];
std::vector<Uint16> expanded_data(twidth * theight);
#endif
for(int j=0; j <theight;j++) for(int i=0; i < twidth; i++) {
@@ -387,7 +387,7 @@ void sdltogl(SDL_Surface *txt, glfont_t& f, int ch) {
#else
GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE,
#endif
expanded_data );
expanded_data.data() );
float x=(float)otwidth / (float)twidth;
float y=(float)otheight / (float)theight;