mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 23:11:58 +00:00
- let FOBJModel::ParseVector actually use its templated size parameter
In this setup the array can be statically updated because the size is always constant per instantiation
This commit is contained in:
parent
25ad71a113
commit
a3df67bdd4
1 changed files with 1 additions and 2 deletions
|
@ -236,7 +236,7 @@ bool FOBJModel::Load(const char* fn, int lumpnum, const char* buffer, int length
|
|||
*/
|
||||
template<typename T, size_t L> void FOBJModel::ParseVector(TArray<T> &array)
|
||||
{
|
||||
float *coord = new float[L];
|
||||
float coord[L];
|
||||
for (size_t axis = 0; axis < L; axis++)
|
||||
{
|
||||
sc.MustGetFloat();
|
||||
|
@ -244,7 +244,6 @@ template<typename T, size_t L> void FOBJModel::ParseVector(TArray<T> &array)
|
|||
}
|
||||
T vec(coord);
|
||||
array.Push(vec);
|
||||
delete[] coord;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue