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
path: root/source
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-07-30 19:38:27 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-07-30 19:44:18 +0300
commit2e2e7aff7cb28337684534d2207816946407788b (patch)
tree14da1dfc59a2638b28cd12aeea70698e89c97235 /source
parentcc397b918ff1b2a51b3b82367506eb7684860cea (diff)
parent885cc4cf9a1d5c167e4cbd26c3294d8b1ad400d8 (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source')
-rw-r--r--source/blender/alembic/intern/abc_customdata.cc9
-rw-r--r--source/blender/blenlib/BLI_compiler_compat.h6
-rw-r--r--source/blender/depsgraph/CMakeLists.txt22
-rw-r--r--source/blender/depsgraph/util/deg_util_foreach.h9
-rw-r--r--source/blender/depsgraph/util/deg_util_function.h14
5 files changed, 4 insertions, 56 deletions
diff --git a/source/blender/alembic/intern/abc_customdata.cc b/source/blender/alembic/intern/abc_customdata.cc
index 87545007870..f2ae1c831d1 100644
--- a/source/blender/alembic/intern/abc_customdata.cc
+++ b/source/blender/alembic/intern/abc_customdata.cc
@@ -26,14 +26,7 @@
#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"
@@ -60,6 +53,8 @@ using Alembic::AbcGeom::OV2fGeomParam;
using Alembic::AbcGeom::OC4fGeomParam;
+typedef std::unordered_map<uint64_t, int> uv_index_map;
+
static inline uint64_t uv_to_hash_key(Imath::V2f v)
{
/* Convert -0.0f to 0.0f, so bitwise comparison works. */
diff --git a/source/blender/blenlib/BLI_compiler_compat.h b/source/blender/blenlib/BLI_compiler_compat.h
index 0726e3bb343..2b53975a106 100644
--- a/source/blender/blenlib/BLI_compiler_compat.h
+++ b/source/blender/blenlib/BLI_compiler_compat.h
@@ -32,11 +32,7 @@
# define alloca _alloca
#endif
-#if defined(__cplusplus) && ((__cplusplus >= 201103L) || defined(_MSC_VER))
-# define HAS_CPP11_FEATURES
-#endif
-
-#if (defined(__GNUC__) || defined(__clang__)) && defined(HAS_CPP11_FEATURES)
+#if (defined(__GNUC__) || defined(__clang__)) && defined(__cplusplus)
extern "C++" {
/* Some magic to be sure we don't have reference in the type. */
template<typename T> static inline T decltype_helper(T x) { return x; }
diff --git a/source/blender/depsgraph/CMakeLists.txt b/source/blender/depsgraph/CMakeLists.txt
index 185a98f2a2b..c9cdea34401 100644
--- a/source/blender/depsgraph/CMakeLists.txt
+++ b/source/blender/depsgraph/CMakeLists.txt
@@ -106,28 +106,6 @@ set(SRC
util/deg_util_function.h
)
-if(WITH_CXX11)
- add_definitions(-DDEG_STD_UNORDERED_MAP)
-elseif(HAVE_STD_UNORDERED_MAP_HEADER)
- if(HAVE_UNORDERED_MAP_IN_STD_NAMESPACE)
- add_definitions(-DDEG_STD_UNORDERED_MAP)
- else()
- if(HAVE_UNORDERED_MAP_IN_TR1_NAMESPACE)
- add_definitions(-DDEG_STD_UNORDERED_MAP_IN_TR1_NAMESPACE)
- else()
- add_definitions(-DDEG_NO_UNORDERED_MAP)
- message(STATUS "Replacing unordered_map/set with map/set (warning: slower!)")
- endif()
- endif()
-else()
- if(HAVE_UNORDERED_MAP_IN_TR1_NAMESPACE)
- add_definitions(-DDEG_TR1_UNORDERED_MAP)
- else()
- add_definitions(-DDEG_NO_UNORDERED_MAP)
- message(STATUS "Replacing unordered_map/set with map/set (warning: slower!)")
- endif()
-endif()
-
if(WITH_BOOST)
list(APPEND INC_SYS
${BOOST_INCLUDE_DIR}
diff --git a/source/blender/depsgraph/util/deg_util_foreach.h b/source/blender/depsgraph/util/deg_util_foreach.h
index e00aa5dbb5e..5484192207b 100644
--- a/source/blender/depsgraph/util/deg_util_foreach.h
+++ b/source/blender/depsgraph/util/deg_util_foreach.h
@@ -30,11 +30,4 @@
#pragma once
-#if (__cplusplus > 199711L) || (defined(_MSC_VER) && _MSC_VER >= 1800)
-# define foreach(x, y) for(x : y)
-#elif defined(HAVE_BOOST_FUNCTION_BINDINGS)
-# include <boost/foreach.hpp>
-# define foreach BOOST_FOREACH
-#else
-# error "Depsgraph requires either Boost or C++11 for range-based loops."
-#endif
+#define foreach(x, y) for(x : y)
diff --git a/source/blender/depsgraph/util/deg_util_function.h b/source/blender/depsgraph/util/deg_util_function.h
index e91986d54ba..8863d92eb74 100644
--- a/source/blender/depsgraph/util/deg_util_function.h
+++ b/source/blender/depsgraph/util/deg_util_function.h
@@ -30,22 +30,8 @@
#pragma once
-#if (__cplusplus > 199711L) || (defined(_MSC_VER) && _MSC_VER >= 1900)
-
#include <functional>
using std::function;
using namespace std::placeholders;
#define function_bind std::bind
-
-#elif defined(HAVE_BOOST_FUNCTION_BINDINGS)
-
-#include <boost/bind.hpp>
-#include <boost/function.hpp>
-
-using boost::function;
-#define function_bind boost::bind
-
-#else
-# error "Depsgraph requires either Boost or C++11 for function bindings."
-#endif