Skip to content

Commit

Permalink
Fix warning: ‘void* memset(void*, int, size_t)’ clearing an object of…
Browse files Browse the repository at this point in the history
… non-trivial type ‘class vpRGBf’; use assignment or value-initialization instead [-Wclass-memaccess]

  225 |   memset(I.bitmap, 0, I.getSize() * sizeof(vpRGBf));
      |   ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • Loading branch information
fspindle committed Oct 16, 2024
1 parent d7e577a commit c1cf355
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions modules/tracker/rbt/src/rendering/vpPanda3DDepthFilters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,7 @@ void vpPanda3DDepthCannyFilter::getRender(vpImage<vpRGBf> &I, vpImage<unsigned c
throw vpException(vpException::fatalError, "Tried to fetch output of a postprocessing filter that was configured as an intermediate output");
}

I.resize(h, w);
memset(I.bitmap, 0, I.getSize() * sizeof(vpRGBf));
I.resize(h, w, 0.f);
valid.resize(I.getHeight(), I.getWidth(), 0);

const unsigned top = static_cast<unsigned int>(std::max(0.0, bb.getTop()));
Expand Down

0 comments on commit c1cf355

Please sign in to comment.