forked from organicmaps/organicmaps
[drape_frontend] Fix memset
of non-trivial CirclesPackDynamicVertex
type
Fixes the following GCC warning: ```` drape_frontend/circles_pack_shape.cpp:133:9: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct df::CirclesPackDynamicVertex’; use assignment or value-initialization instead [-Wclass-memaccess] 133 | memset(m_buffer.data(), 0, m_buffer.size() * sizeof(CirclesPackDynamicVertex)); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ```` Signed-off-by: Ferenc Géczi <ferenc.gm@gmail.com>
This commit is contained in:
parent
6465fa8686
commit
958589b29a
1 changed files with 1 additions and 1 deletions
|
@ -130,7 +130,7 @@ void CirclesPackHandle::SetPoint(size_t index, m2::PointD const & position, floa
|
|||
|
||||
void CirclesPackHandle::Clear()
|
||||
{
|
||||
memset(m_buffer.data(), 0, m_buffer.size() * sizeof(CirclesPackDynamicVertex));
|
||||
fill(begin(m_buffer), end(m_buffer), CirclesPackDynamicVertex(glsl::vec3(0.0f), glsl::vec4(0.0f)));
|
||||
m_needUpdate = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue