1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-11-07 01:03:00 +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

@@ -201,9 +201,9 @@ void polylineColor(SDL_Surface *s, int *x, int *y, int polyi, int col) {
}
void filledPolygonColorI(SDL_Surface *s, int* px, int *py, int polyi, int col) {
Sint16 spx[polyi], spy[polyi];
for(int i=0; i<polyi; i++) spx[i] = px[i], spy[i] = py[i];
filledPolygonColor(s, spx, spy, polyi, col);
std::vector<Sint16> spx(px, px + polyi);
std::vector<Sint16> spy(py, py + polyi);
filledPolygonColor(s, spx.data(), spy.data(), polyi, col);
}
#endif