mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-02-03 07:01:13 +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)
|
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++)
|
for (size_t axis = 0; axis < L; axis++)
|
||||||
{
|
{
|
||||||
sc.MustGetFloat();
|
sc.MustGetFloat();
|
||||||
|
@ -244,7 +244,6 @@ template<typename T, size_t L> void FOBJModel::ParseVector(TArray<T> &array)
|
||||||
}
|
}
|
||||||
T vec(coord);
|
T vec(coord);
|
||||||
array.Push(vec);
|
array.Push(vec);
|
||||||
delete[] coord;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue