From 85aa299d7592cc332d2639e0213daae1e883ac9a Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Thu, 4 Dec 2025 20:30:06 +0100 Subject: [PATCH] moved sizeto to hyper.h from floorshapes.cpp --- floorshapes.cpp | 8 -------- hyper.h | 8 ++++++++ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/floorshapes.cpp b/floorshapes.cpp index 9385919b..baf27f1f 100644 --- a/floorshapes.cpp +++ b/floorshapes.cpp @@ -277,14 +277,6 @@ void geometry_information::bshape2(hpcshape& sh, PPR prio, int shapeid, matrixli if(!apeirogonal) hpcpush(starting_point); } -template void sizeto(T& t, int n) { - if(isize(t) <= n) t.resize(n+1); - } - -template void sizeto(T& t, int n, const U& val) { - if(isize(t) <= n) t.resize(n+1, val); - } - #if CAP_BT void geometry_information::bshape_bt(floorshape &fsh, int id, int sides, ld size, cell *c) { diff --git a/hyper.h b/hyper.h index 6c54431a..a9e3044d 100644 --- a/hyper.h +++ b/hyper.h @@ -968,6 +968,14 @@ struct debugflag { void flip() { enabled = !enabled; } }; +template void sizeto(T& t, int n) { + if(isize(t) <= n) t.resize(n+1); + } + +template void sizeto(T& t, int n, const U& val) { + if(isize(t) <= n) t.resize(n+1, val); + } + } /** this macro is used to delay performing the action in case if everything is rolled back */