1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-27 22:39:53 +00:00

fixed uninitialized variable warning

This commit is contained in:
Zeno Rogue 2018-08-22 09:52:24 +02:00
parent 01a41ba6a4
commit bb93bf9150

View File

@ -337,7 +337,7 @@ template<class T> struct connection_table {
T* move_table[MAX_EDGE];
unsigned char spintable_extra[2];
T* full() { T* x; return (T*)((char*)this - ((char*)(&(x->c)) - (char*)x)); }
T* full() { T* x = (T*) this; return (T*)((char*)this - ((char*)(&(x->c)) - (char*)x)); }
unsigned char& get_spinchar(int d) {
if(d < 12) return spintable[d>>1];
else return spintable_extra[(d-12)>>1];