move data declaration after test if elements are in current scope.
parent
9efa4282fe
commit
f376a3e8cd
|
@ -454,13 +454,12 @@ void ResolveVertexDataArray(std::vector<T>& data_out, const Scope& source,
|
|||
ParseVectorDataArray(tempData, GetRequiredElement(source, dataElementName));
|
||||
|
||||
data_out.resize(vertex_count);
|
||||
|
||||
std::vector<int> uvIndices;
|
||||
if ( !HasElement( source, indexDataElementName ) ) {
|
||||
return;
|
||||
}
|
||||
ParseVectorDataArray(uvIndices,GetRequiredElement(source,indexDataElementName));
|
||||
|
||||
std::vector<int> uvIndices;
|
||||
ParseVectorDataArray(uvIndices,GetRequiredElement(source,indexDataElementName));
|
||||
for (size_t i = 0, e = uvIndices.size(); i < e; ++i) {
|
||||
|
||||
const unsigned int istart = mapping_offsets[i], iend = istart + mapping_counts[i];
|
||||
|
|
Loading…
Reference in New Issue