mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2026-01-13 06:22:39 +00:00
moved sizeto to hyper.h from floorshapes.cpp
This commit is contained in:
@@ -277,14 +277,6 @@ void geometry_information::bshape2(hpcshape& sh, PPR prio, int shapeid, matrixli
|
||||
if(!apeirogonal) hpcpush(starting_point);
|
||||
}
|
||||
|
||||
template<class T> void sizeto(T& t, int n) {
|
||||
if(isize(t) <= n) t.resize(n+1);
|
||||
}
|
||||
|
||||
template<class T, class U> 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) {
|
||||
|
||||
|
||||
8
hyper.h
8
hyper.h
@@ -968,6 +968,14 @@ struct debugflag {
|
||||
void flip() { enabled = !enabled; }
|
||||
};
|
||||
|
||||
template<class T> void sizeto(T& t, int n) {
|
||||
if(isize(t) <= n) t.resize(n+1);
|
||||
}
|
||||
|
||||
template<class T, class U> 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 */
|
||||
|
||||
Reference in New Issue
Block a user