More CleanUp of JabyEngine/PoolBox
This commit is contained in:
@@ -88,5 +88,23 @@ namespace JabyEngine {
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
namespace LinkHelper {
|
||||
template<typename T>
|
||||
static Link* link_array(Link* last_prim, T* elements, size_t length) {
|
||||
for(size_t n = 0; n < length; n++) {
|
||||
last_prim->concat(elements[n]);
|
||||
last_prim = &elements[n];
|
||||
}
|
||||
|
||||
last_prim->terminate();
|
||||
return last_prim;
|
||||
}
|
||||
|
||||
template<typename T, size_t N>
|
||||
static Link* link_array(Link* last_prim, T(&elements)[N]) {
|
||||
return link_array(last_prim, elements, N);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -70,6 +70,7 @@ namespace JabyEngine {
|
||||
Body points[N];
|
||||
Termination end;
|
||||
|
||||
// Could also be none const in the future
|
||||
template<typename T = Body>
|
||||
constexpr typename enable_if<is_same<T, Vertex>::value, Vertex>::type operator[](size_t idx) const {
|
||||
if(idx == 0) {
|
||||
|
Reference in New Issue
Block a user