egg: work around compiler bug in Visual Studio 2017

Fixes #379
This commit is contained in:
rdb 2018-09-13 20:23:58 +02:00
parent ecb2b6f546
commit 3417b9df09

View File

@ -677,7 +677,15 @@ transform(const LMatrix4d &mat) {
typedef pvector<EggVertex *> 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) {