summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2015-05-26 15:18:27 +0200
committerKonstantin Käfer <mail@kkaefer.com>2015-05-26 17:57:38 +0200
commitf4707f72e0ce7f1c40337c72ae5c0c0c8ef0efed (patch)
tree31102ca2b739d2b21fcfc231585830969f2b4fa4 /include
parentfdf6026e6249f99b260f15ec672a35c7e9db950d (diff)
downloadqtlocation-mapboxgl-f4707f72e0ce7f1c40337c72ae5c0c0c8ef0efed.tar.gz
Replace mbgl::util::make_unique<> with std::make_unique<>
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/platform/default/image_reader.hpp2
-rw-r--r--include/mbgl/platform/log.hpp1
-rw-r--r--include/mbgl/storage/file_source.hpp1
-rw-r--r--include/mbgl/util/std.hpp23
4 files changed, 1 insertions, 26 deletions
diff --git a/include/mbgl/platform/default/image_reader.hpp b/include/mbgl/platform/default/image_reader.hpp
index 985e4874cd..52a67a2830 100644
--- a/include/mbgl/platform/default/image_reader.hpp
+++ b/include/mbgl/platform/default/image_reader.hpp
@@ -1,11 +1,11 @@
#ifndef MBGL_UTIL_IMAGE_READER_HPP
#define MBGL_UTIL_IMAGE_READER_HPP
-#include <mbgl/util/std.hpp>
#include <mbgl/util/noncopyable.hpp>
// stl
#include <stdexcept>
#include <string>
+#include <memory>
namespace mbgl { namespace util {
diff --git a/include/mbgl/platform/log.hpp b/include/mbgl/platform/log.hpp
index d6f3cd1ab4..86a8cdbef1 100644
--- a/include/mbgl/platform/log.hpp
+++ b/include/mbgl/platform/log.hpp
@@ -3,7 +3,6 @@
#include <mbgl/platform/event.hpp>
-#include <mbgl/util/std.hpp>
#include <mbgl/util/noncopyable.hpp>
#include <memory>
diff --git a/include/mbgl/storage/file_source.hpp b/include/mbgl/storage/file_source.hpp
index 7c6e578a9a..3b19e00788 100644
--- a/include/mbgl/storage/file_source.hpp
+++ b/include/mbgl/storage/file_source.hpp
@@ -5,7 +5,6 @@
#include "resource.hpp"
#include <mbgl/util/noncopyable.hpp>
-#include <mbgl/util/std.hpp>
#include <mbgl/util/util.hpp>
#include <functional>
diff --git a/include/mbgl/util/std.hpp b/include/mbgl/util/std.hpp
index e64820de47..0e2d3346bf 100644
--- a/include/mbgl/util/std.hpp
+++ b/include/mbgl/util/std.hpp
@@ -8,29 +8,6 @@
namespace mbgl {
namespace util {
-// C++14 backfill based on http://llvm.org/svn/llvm-project/libcxx/trunk/include/memory
-
-namespace detail {
-template<class T> struct unique_type { typedef ::std::unique_ptr<T> single; };
-template<class T> struct unique_type<T[]> { typedef ::std::unique_ptr<T[]> unknown_bound; };
-template<class T, size_t size> struct unique_type<T[size]> { typedef void known_bound; };
-}
-
-template<class T, class... Args>
-typename detail::unique_type<T>::single make_unique(Args&&... args) {
- return ::std::unique_ptr<T>(new T(::std::forward<Args>(args)...));
-}
-
-template<class T>
-typename detail::unique_type<T>::unknown_bound make_unique(size_t size) {
- return ::std::unique_ptr<T>(new typename ::std::remove_extent<T>::type[size]());
-}
-
-template<class T, class... Args>
-typename detail::unique_type<T>::known_bound make_unique(Args&&...) = delete;
-
-
-
template <typename Container, typename ForwardIterator, typename Predicate>
void erase_if(Container &container, ForwardIterator it, const ForwardIterator end, Predicate pred) {
while (it != end) {