Cleaned up MSVC 2013 compatibility code

We no longer support that compiler.
This commit is contained in:
Charles Dang 2018-03-21 17:52:24 +11:00
parent 29ee9a7150
commit 1e9f2548a6
5 changed files with 2 additions and 44 deletions

View file

@ -199,10 +199,7 @@ loading_screen::~loading_screen()
* to end the thread faster.
*/
if(is_worker_running_) {
#if defined(_MSC_VER) && _MSC_VER <= 1800
HANDLE process = GetCurrentProcess();
TerminateProcess(process, 0u);
#elif defined(_LIBCPP_VERSION) || defined(__MINGW32__)
#if defined(_LIBCPP_VERSION) || defined(__MINGW32__)
std::_Exit(0);
#else
std::quick_exit(0);

View file

@ -336,16 +336,7 @@ private:
* of copied when the grid's child vector is resized. std::vector will
* utilize a move constructor as long as a non-throwing one is provided.
*/
#if defined(_MSC_VER) && _MSC_VER <= 1800 // MSVC 2013
child(child&& c) noexcept
: flags_(c.flags_)
, border_size_(c.border_size_)
, widget_(std::move(c.widget_))
{
}
#else
child(child&&) noexcept = default;
#endif
/** Returns the best size for the cell. */
point get_best_size() const;

View file

@ -79,15 +79,12 @@ namespace t_translation {
ter_map() = default;
ter_map(const ter_map&) = default;
#if !defined(_MSC_VER) || _MSC_VER >= 1900
ter_map(ter_map&&) = default;
#endif
ter_map(int w, int h, terrain_code fill = terrain_code()) : data(w * h, fill), w(w), h(h) {}
ter_map & operator= (const ter_map &) = default;
#if !defined(_MSC_VER) || _MSC_VER >= 1900
ter_map & operator= (ter_map &&) = default;
#endif
terrain_code& get(int x, int y) { std::size_t index = x * h + y; return data.at(index); }
const terrain_code& get(int x, int y) const { std::size_t index = x * h + y; return data.at(index); }

View file

@ -101,27 +101,8 @@ public:
unit_filter(const unit_filter&) = default;
unit_filter& operator=(const unit_filter&) = default;
#if defined(_MSC_VER) && _MSC_VER < 1900
unit_filter(unit_filter&& u)
: cfg_(std::move(u.cfg_))
, fc_(u.fc_)
, use_flat_tod_(u.use_flat_tod_)
, impl_(std::move(u.impl_))
, max_matches_(u.max_matches_)
{}
unit_filter& operator=(unit_filter&& u)
{
cfg_ = std::move(u.cfg_);
fc_ = u.fc_;
use_flat_tod_ = u.use_flat_tod_;
impl_ = std::move(u.impl_);
max_matches_ = u.max_matches_;
return *this;
}
#else
unit_filter(unit_filter&&) = default;
unit_filter& operator=(unit_filter&&) = default;
#endif
unit_filter& set_use_flat_tod(bool value) {
use_flat_tod_ = value;

View file

@ -213,15 +213,7 @@ public:
wesnothd_connection_ptr(const wesnothd_connection_ptr&) = delete;
wesnothd_connection_ptr& operator=(const wesnothd_connection_ptr&) = delete;
#if defined(_MSC_VER) && _MSC_VER == 1800
wesnothd_connection_ptr(wesnothd_connection_ptr&& other)
: ptr_(std::move(other.ptr_))
{
}
#else
wesnothd_connection_ptr(wesnothd_connection_ptr&&) = default;
#endif
wesnothd_connection_ptr& operator=(wesnothd_connection_ptr&&);
~wesnothd_connection_ptr();