Other fixes for making compile the project on Visual Studio 2013
This commit is contained in:
parent
483993df1e
commit
11e45f683a
|
@ -3,6 +3,7 @@
|
|||
// std
|
||||
#include <memory>
|
||||
// Qt
|
||||
#include <QtGlobal>
|
||||
#include <QtCore/QString>
|
||||
#include <QtCore/QMetaType>
|
||||
// DOtherSide
|
||||
|
@ -124,10 +125,10 @@ public:
|
|||
SafeQMetaObjectPtr(const SafeQMetaObjectPtr&) = delete;
|
||||
SafeQMetaObjectPtr& operator=(const SafeQMetaObjectPtr&) = delete;
|
||||
|
||||
operator bool() const noexcept { return m_d != nullptr; }
|
||||
operator const QMetaObject*() const noexcept { return m_d.get(); }
|
||||
const QMetaObject* operator->() const noexcept { return m_d.get(); }
|
||||
void reset(QMetaObject* other) noexcept { m_d.reset(other); }
|
||||
operator bool() const Q_DECL_NOEXCEPT { return m_d != nullptr; }
|
||||
operator const QMetaObject*() const Q_DECL_NOEXCEPT { return m_d.get(); }
|
||||
const QMetaObject* operator->() const Q_DECL_NOEXCEPT { return m_d.get(); }
|
||||
void reset(QMetaObject* other) Q_DECL_NOEXCEPT { m_d.reset(other); }
|
||||
|
||||
private:
|
||||
std::unique_ptr<QMetaObject, void(*)(void*)> m_d;
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
#include <algorithm>
|
||||
#include <functional>
|
||||
#include <type_traits>
|
||||
// Qt
|
||||
#include <QtGlobal>
|
||||
|
||||
namespace DOS
|
||||
{
|
||||
|
@ -14,19 +16,19 @@ struct wrapped_array {
|
|||
wrapped_array(T* first, std::ptrdiff_t size)
|
||||
: wrapped_array {first, first + size} {}
|
||||
|
||||
T* begin() const noexcept { return begin_; }
|
||||
T* end() const noexcept { return end_; }
|
||||
T* begin() const Q_DECL_NOEXCEPT { return begin_; }
|
||||
T* end() const Q_DECL_NOEXCEPT { return end_; }
|
||||
|
||||
T* begin_;
|
||||
T* end_;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
wrapped_array<T> wrap_array(T* first, std::ptrdiff_t size) noexcept
|
||||
wrapped_array<T> wrap_array(T* first, std::ptrdiff_t size) Q_DECL_NOEXCEPT
|
||||
{ return {first, size}; }
|
||||
|
||||
template <typename T, typename G>
|
||||
std::vector<T> toVector(G* first, std::ptrdiff_t size) noexcept
|
||||
std::vector<T> toVector(G* first, std::ptrdiff_t size) Q_DECL_NOEXCEPT
|
||||
{
|
||||
const wrapped_array<G> array = wrap_array(first, size);
|
||||
std::vector<T> result;
|
||||
|
@ -36,7 +38,7 @@ std::vector<T> toVector(G* first, std::ptrdiff_t size) noexcept
|
|||
}
|
||||
|
||||
template <typename T, typename K, typename R = typename std::result_of<K(T)>::type>
|
||||
std::vector<R> toVector(T* first, std::ptrdiff_t size, K f) noexcept
|
||||
std::vector<R> toVector(T* first, std::ptrdiff_t size, K f) Q_DECL_NOEXCEPT
|
||||
{
|
||||
wrapped_array<T> array = wrap_array<T>(first, size);
|
||||
std::vector<R> result;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
project('DOtherSide', 'cpp', default_options : ['cpp_std=c++14'])
|
||||
project('DOtherSide', 'cpp', default_options : ['cpp_std=c++11'])
|
||||
|
||||
subdir('lib')
|
||||
subdir('test')
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import QtQuick 2.5
|
||||
import QtQuick.Controls 1.4
|
||||
import QtQuick 2.4
|
||||
import QtQuick.Controls 1.3
|
||||
|
||||
ApplicationWindow {
|
||||
width: 100
|
||||
|
|
Loading…
Reference in New Issue