From 71e65daf5c15ef54eb61b998d5b7ccfe14bd2816 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Sun, 1 Jul 2018 16:48:19 +0200 Subject: Fix T55687: compile error when not using c++11. --- source/blender/alembic/intern/abc_customdata.cc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/source/blender/alembic/intern/abc_customdata.cc b/source/blender/alembic/intern/abc_customdata.cc index 8ab9f1118f4..87545007870 100644 --- a/source/blender/alembic/intern/abc_customdata.cc +++ b/source/blender/alembic/intern/abc_customdata.cc @@ -26,7 +26,14 @@ #include #include + +#if (__cplusplus > 199711L) || (defined(_MSC_VER) && _MSC_VER >= 1900) #include +typedef std::unordered_map uv_index_map; +#else +#include +typedef std::map uv_index_map; +#endif extern "C" { #include "DNA_customdata_types.h" @@ -106,7 +113,7 @@ static void get_uvs(const CDStreamConfig &config, } } else { - std::unordered_map idx_map; + uv_index_map idx_map; int idx_count = 0; for (int i = 0; i < num_poly; ++i) { @@ -117,7 +124,7 @@ static void get_uvs(const CDStreamConfig &config, loopuvpoly--; Imath::V2f uv(loopuvpoly->uv[0], loopuvpoly->uv[1]); uint64_t k = uv_to_hash_key(uv); - std::unordered_map::iterator it = idx_map.find(k); + uv_index_map::iterator it = idx_map.find(k); if (it == idx_map.end()) { idx_map[k] = idx_count; uvs.push_back(uv); -- cgit v1.2.3