From 3417b9df09248da91431dba99af2b3b2aa6257c8 Mon Sep 17 00:00:00 2001 From: rdb Date: Thu, 13 Sep 2018 20:23:58 +0200 Subject: [PATCH] egg: work around compiler bug in Visual Studio 2017 Fixes #379 --- panda/src/egg/eggVertexPool.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/panda/src/egg/eggVertexPool.cxx b/panda/src/egg/eggVertexPool.cxx index 8fa3b5e637..6f2768599e 100644 --- a/panda/src/egg/eggVertexPool.cxx +++ b/panda/src/egg/eggVertexPool.cxx @@ -677,7 +677,15 @@ transform(const LMatrix4d &mat) { typedef pvector Verts; Verts verts; verts.reserve(size()); + + // Work around MSVC 2017 compiler bug, see GitHub issue #379 +#ifdef _MSC_VER + for (const IndexVertices::value_type &v : _index_vertices) { + verts.push_back(v.second); + } +#else std::copy(begin(), end(), std::back_inserter(verts)); +#endif Verts::const_iterator vi; for (vi = verts.begin(); vi != verts.end(); ++vi) {