Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linter issue #5

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/MaxUsd/MappedAttributeBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ namespace MAXUSD_NS_DEF {
class FloatNArray
{

size_t dimension;
size_t dimension;
std::unique_ptr<pxr::VtFloatArray> floatArray;
std::unique_ptr<pxr::VtVec2fArray> float2Array;
std::unique_ptr<pxr::VtVec3fArray> float3Array;
Expand All @@ -70,13 +70,14 @@ class FloatNArray
case 1: return attribute.Set(*floatArray, timeCode);
case 2: return attribute.Set(*float2Array, timeCode);
case 3: return attribute.Set(*float3Array, timeCode);
}
}
return false;
}

void Set(size_t index, const Point3& p)
{
switch (dimension) {
switch (dimension)
{
case 1: (*floatArray)[index] = p.x; break;
case 2: (*float2Array)[index] = pxr::GfVec2f(p.x, p.y); break;
case 3: (*float3Array)[index] = pxr::GfVec3f(p.x, p.y, p.z); break;
Expand Down Expand Up @@ -414,4 +415,4 @@ bool MappedAttributeBuilder::PopulateAttribute(
return values.AssignToAttribute(attribute, timeCode);
}

} // namespace MAXUSD_NS_DEF
} // namespace MAXUSD_NS_DEF
Loading