Skip to content

Commit

Permalink
Removed some C++11 include guards I missed
Browse files Browse the repository at this point in the history
  • Loading branch information
Vultraz committed Apr 1, 2016
1 parent bc20a3d commit 5195758
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 31 deletions.
11 changes: 0 additions & 11 deletions src/gui/auxiliary/filter.hpp
Expand Up @@ -25,9 +25,6 @@
#include "util.hpp"
#include "serialization/string_utils.hpp"
#include "serialization/unicode.hpp"
#ifndef HAVE_CXX11
#include <stdexcept> // needed for the at() emulation
#endif

namespace gui2
{
Expand Down Expand Up @@ -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<std::string,std::string>::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
Expand Down
14 changes: 0 additions & 14 deletions src/units/map.hpp
Expand Up @@ -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); }
Expand Down
6 changes: 0 additions & 6 deletions src/variable.hpp
Expand Up @@ -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<const config> & cache);
public:
Expand Down

0 comments on commit 5195758

Please sign in to comment.