Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-07-01 21:15:21 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-07-01 21:15:21 +0300
commit37994e0af2cf6f0d7ed8a072eb765dfb022ceaef (patch)
tree07ea3a893aa2dc586f22a46681aa77c430f63317 /source/blender/alembic
parent192e5d65a746798f6bddf897570ff8aba55c9c5a (diff)
parent26c5a1c301d3d554c4b1244b219f9883249f382d (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/alembic')
-rw-r--r--source/blender/alembic/intern/abc_customdata.cc11
1 files 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 <Alembic/AbcGeom/All.h>
#include <algorithm>
+
+#if (__cplusplus > 199711L) || (defined(_MSC_VER) && _MSC_VER >= 1900)
#include <unordered_map>
+typedef std::unordered_map<uint64_t, int> uv_index_map;
+#else
+#include <map>
+typedef std::map<uint64_t, int> 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<uint64_t, int> 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<uint64_t, int>::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);