1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-29 21:13:00 +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) { template<class T> T* tailored_alloc(int degree) {
const T* sample = (T*) &degree; const T* sample = nullptr;
T* result; T* result;
#ifndef NO_TAILORED_ALLOC #ifndef NO_TAILORED_ALLOC
int b = (char*)&sample->c.move_table[degree] + degree - (char*) sample; int b = (char*)&sample->c.move_table[degree] + degree - (char*) sample;