From 51957589ed9a5ae18484301b140032f4fa2d1332 Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Fri, 1 Apr 2016 12:27:06 +1100 Subject: [PATCH] Removed some C++11 include guards I missed --- src/gui/auxiliary/filter.hpp | 11 ----------- src/units/map.hpp | 14 -------------- src/variable.hpp | 6 ------ 3 files changed, 31 deletions(-) diff --git a/src/gui/auxiliary/filter.hpp b/src/gui/auxiliary/filter.hpp index 121fd26d443f..e372a6bb39de 100644 --- a/src/gui/auxiliary/filter.hpp +++ b/src/gui/auxiliary/filter.hpp @@ -25,9 +25,6 @@ #include "util.hpp" #include "serialization/string_utils.hpp" #include "serialization/unicode.hpp" -#ifndef HAVE_CXX11 -#include // needed for the at() emulation -#endif namespace gui2 { @@ -70,16 +67,8 @@ inline bool contains(const tpane::titem& item, const std::string& tag, const ttext_box& text_box) { -#ifdef HAVE_CXX11 return item.tags.at(tag).find(utf8::lowercase(text_box.text())) != std::string::npos; -#else - std::map::const_iterator it = item.tags.find(tag); - if(it == item.tags.end()) { - throw std::out_of_range("Key »" + tag + "« doesn't exist."); - } - return it->second.find(utf8::lowercase(text_box.text())) != std::string::npos; -#endif } } // namespace gui2 diff --git a/src/units/map.hpp b/src/units/map.hpp index 98feed58810d..b7781a69b12a 100644 --- a/src/units/map.hpp +++ b/src/units/map.hpp @@ -230,22 +230,8 @@ class unit_map { return (valid_for_dereference() && i_->second.unit); } -#ifndef HAVE_CXX11 - struct safe_bool_impl { void nonnull() {} }; - /** - * Used as the return type of the conversion operator for boolean contexts. - * Needed, since the compiler would otherwise consider the following - * conversion (C legacy): cfg["abc"] -> "abc"[bool(cfg)] -> 'b' - */ - typedef void (safe_bool_impl::*safe_bool)(); - - operator safe_bool() const - { return valid() ? &safe_bool_impl::nonnull : nullptr; } -#else explicit operator bool() const { return valid(); } -#endif - bool operator==(const iterator_base &rhs) const { return (tank_ == rhs.tank_) && ( i_ == rhs.i_ ); } bool operator!=(const iterator_base &rhs) const { return !operator==(rhs); } diff --git a/src/variable.hpp b/src/variable.hpp index a2b1264a1df9..a1ca805e1476 100644 --- a/src/variable.hpp +++ b/src/variable.hpp @@ -47,12 +47,6 @@ class vconfig friend class std::pair; #endif -#ifndef HAVE_CXX11 - struct safe_bool_impl { void nonnull() {} }; - /// Used as the return type of the conversion operator for boolean contexts. - typedef void (safe_bool_impl::*safe_bool)(); -#endif - vconfig(); vconfig(const config & cfg, const boost::shared_ptr & cache); public: