Skip to content

Commit

Permalink
MeshLod: silence memcpy warning on GCC
Browse files Browse the repository at this point in the history
  • Loading branch information
paroj committed Oct 12, 2023
1 parent 7f3ec9c commit 2d6afac
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions Components/MeshLodGenerator/src/OgreLodBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,10 @@ namespace Ogre
Vector3f* pOut = (Vector3f *)vertexBuffer->lock(HardwareBuffer::HBL_DISCARD);
Vector3f* pEnd = pOut + vertexCount;
for (; pOut < pEnd; pOut++) {
float* pFloat;
elemPos->baseVertexPointerToElement(vertex, &pFloat);
memcpy(pOut, pFloat, sizeof(Vector3f));
memcpy(pOut, vertex + elemPos->getOffset(), sizeof(Vector3f));
vertex += vSize;
if(useVertexNormals){
elemNormal->baseVertexPointerToElement(vNormal, &pFloat);
memcpy(pNormalOut, pFloat, sizeof(Vector3f));
memcpy(pNormalOut, vNormal + elemNormal->getOffset(), sizeof(Vector3f));
pNormalOut++;
vNormal += vNormalSize;
}
Expand Down

0 comments on commit 2d6afac

Please sign in to comment.