1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-23 21:07:17 +00:00

fixed the warning (-Warray-bounds)

This commit is contained in:
Zeno Rogue 2021-07-04 09:53:29 +02:00
parent 43fed4adac
commit d07662d11c

View File

@ -178,7 +178,7 @@ template<class T> struct connection_table {
*/
template<class T> T* tailored_alloc(int degree) {
const T* sample = (T*) &degree;
const T* sample = nullptr;
T* result;
#ifndef NO_TAILORED_ALLOC
int b = (char*)&sample->c.move_table[degree] + degree - (char*) sample;