Skip to content

Commit

Permalink
Small fix: replace transform to memcpy
Browse files Browse the repository at this point in the history
  • Loading branch information
brunojezek committed Sep 1, 2023
1 parent a3c772f commit ed97686
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions filament/src/details/SkinningBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,7 @@ void updateDataAt(backend::DriverApi& driver,
size_t elementSize = sizeof(float2);
size_t size = getSkinningBufferSize(count);
auto* out = (float2*) malloc(size);
std::transform(pairs.begin(), pairs.begin() + count, out,
[](const float2& p) { return float2(p); });
std::memcpy(out, pairs.begin(), size);

size_t const textureWidth = getSkinningBufferWidth( count);
size_t const lineCount = count / textureWidth;
Expand Down

0 comments on commit ed97686

Please sign in to comment.