Skip to content

Commit

Permalink
Fix compiler error in CompressedArray.cpp.
Browse files Browse the repository at this point in the history
Fixes #2522
  • Loading branch information
jasonbeverage committed May 7, 2024
1 parent f719f91 commit cdaabe2
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/osgEarth/CompressedArray.cpp
Expand Up @@ -152,8 +152,7 @@ namespace osgEarth {
if (g.getQuantization() == osgEarth::CompressedVec3Array::QUANTIZE_VERTEX)
{
std::vector<osg::Vec4us> decoded(size);
int resvb = meshopt_decodeVertexBuffer(&decoded[0], decoded.size(), sizeof(osg::Vec4us), &vbuf[0], vbuf.size());
assert(resvb == 0 && resib == 0);
meshopt_decodeVertexBuffer(&decoded[0], decoded.size(), sizeof(osg::Vec4us), &vbuf[0], vbuf.size());

for (unsigned int i = 0; i < size; ++i)
{
Expand All @@ -166,8 +165,7 @@ namespace osgEarth {
if (g.getQuantization() == osgEarth::CompressedVec3Array::QUANTIZE_NORMAL)
{
std::vector<unsigned int> decoded(size);
int resvb = meshopt_decodeVertexBuffer(&decoded[0], decoded.size(), sizeof(unsigned int), &vbuf[0], vbuf.size());
assert(resvb == 0 && resib == 0);
meshopt_decodeVertexBuffer(&decoded[0], decoded.size(), sizeof(unsigned int), &vbuf[0], vbuf.size());

for (unsigned int i = 0; i < size; ++i)
{
Expand All @@ -189,8 +187,7 @@ namespace osgEarth {
else if (g.getQuantization() == osgEarth::CompressedVec3Array::QUANTIZE_HALF)
{
std::vector<osg::Vec4us> decoded(size);
int resvb = meshopt_decodeVertexBuffer(&decoded[0], decoded.size(), sizeof(osg::Vec4us), &vbuf[0], vbuf.size());
assert(resvb == 0 && resib == 0);
meshopt_decodeVertexBuffer(&decoded[0], decoded.size(), sizeof(osg::Vec4us), &vbuf[0], vbuf.size());
for (unsigned int i = 0; i < decoded.size(); ++i)
{
osg::Vec3 v(
Expand Down Expand Up @@ -334,8 +331,7 @@ namespace osgEarth {


std::vector<osg::Vec2us> decoded(size);
int resvb = meshopt_decodeVertexBuffer(&decoded[0], decoded.size(), sizeof(osg::Vec2us), &vbuf[0], vbuf.size());
assert(resvb == 0 && resib == 0);
meshopt_decodeVertexBuffer(&decoded[0], decoded.size(), sizeof(osg::Vec2us), &vbuf[0], vbuf.size());
for (unsigned int i = 0; i < decoded.size(); ++i)
{
osg::Vec2 v(
Expand Down

0 comments on commit cdaabe2

Please sign in to comment.