1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-29 19:40:35 +00:00

Fix a compiler warning from GCC 4.6.4.

The variable name in this warning is "pre-phi-tmp", as in, some
compiler internals spilling into userspace. But I think it's probably
referring to `bestV`, and indeed, this initialization silences the
warning.

    geometry2.cpp: In function ‘void hr::virtualRebaseSimple(hr::heptagon*&, hr::transmatrix&)’:
    geometry2.cpp:366:7: error: ‘prephitmp.91209’ may be used uninitialized in this function [-Werror=uninitialized]
This commit is contained in:
Arthur O'Dwyer 2019-02-10 14:36:09 -05:00
parent 5e8d03e90d
commit 5efd1f5662

View File

@ -356,7 +356,7 @@ void virtualRebaseSimple(heptagon*& base, transmatrix& at) {
heptagon *newbase = NULL;
transmatrix bestV;
transmatrix bestV {};
for(int d=0; d<S7; d++) {
heptspin hs(h, d, false);
@ -592,4 +592,3 @@ hyperpoint get_warp_corner(cell *c, int cid) {
}
}