diff --git a/src/chat_events.cpp b/src/chat_events.cpp index e92de7fc4e14..dc4becfb01dd 100644 --- a/src/chat_events.cpp +++ b/src/chat_events.cpp @@ -22,8 +22,6 @@ #include "preferences/general.hpp" #include "preferences/game.hpp" -#include - static lg::log_domain log_engine("engine"); #define ERR_NG LOG_STREAM(err, log_engine) #define LOG_NG LOG_STREAM(info, log_engine) diff --git a/src/config_attribute_value.hpp b/src/config_attribute_value.hpp index ee012b3ed822..98aeeb473442 100644 --- a/src/config_attribute_value.hpp +++ b/src/config_attribute_value.hpp @@ -41,9 +41,6 @@ #include #include -#include -#include - class enum_tag; /** diff --git a/src/fake_unit_ptr.cpp b/src/fake_unit_ptr.cpp index 401fc9043c84..4d321ae6913e 100644 --- a/src/fake_unit_ptr.cpp +++ b/src/fake_unit_ptr.cpp @@ -19,8 +19,6 @@ #include "units/unit.hpp" #include "units/ptr.hpp" -#include - fake_unit_ptr::fake_unit_ptr() : unit_(), my_manager_(nullptr) {} fake_unit_ptr::fake_unit_ptr(const internal_ptr & u) : unit_(u), my_manager_(nullptr) {} fake_unit_ptr::fake_unit_ptr(const internal_ptr & u, fake_unit_manager * mgr) : unit_(u), my_manager_(nullptr) @@ -40,7 +38,7 @@ fake_unit_ptr::fake_unit_ptr(fake_unit_ptr && ptr) } void fake_unit_ptr::swap (fake_unit_ptr & o) { - boost::swap(unit_, o.unit_); + std::swap(unit_, o.unit_); std::swap(my_manager_, o.my_manager_); } diff --git a/src/gui/dialogs/preferences_dialog.cpp b/src/gui/dialogs/preferences_dialog.cpp index cc3aa2832cfe..a5cae212846d 100644 --- a/src/gui/dialogs/preferences_dialog.cpp +++ b/src/gui/dialogs/preferences_dialog.cpp @@ -57,13 +57,8 @@ #include "gui/widgets/toggle_button.hpp" #include "gui/widgets/window.hpp" -#if BOOST_VERSION >= 106700 -#include -#else -#include -#endif - #include +#include namespace gui2 { @@ -142,12 +137,7 @@ void preferences_dialog::set_resolution_list(menu_button& res_list) config option; option["label"] = formatter() << res.x << font::unicode_multiplication_sign << res.y; -#if BOOST_VERSION >= 106700 - const int div = boost::integer::gcd(res.x, res.y); -#else - const int div = boost::math::gcd(res.x, res.y); -#endif - + const int div = std::gcd(12, 4); const int x_ratio = res.x / div; const int y_ratio = res.y / div; diff --git a/src/gui/widgets/slider.cpp b/src/gui/widgets/slider.cpp index 858573fd6ac5..6b7289b1d517 100644 --- a/src/gui/widgets/slider.cpp +++ b/src/gui/widgets/slider.cpp @@ -29,12 +29,7 @@ #include "wml_exception.hpp" #include - -#if BOOST_VERSION >= 106700 -#include -#else -#include -#endif +#include #define LOG_SCOPE_HEADER get_control_type() + " [" + id() + "] " + __func__ #define LOG_HEADER LOG_SCOPE_HEADER + ':' @@ -265,12 +260,7 @@ void slider::set_value_range(int min_value, int max_value) int diff = max_value - min_value; int old_value = get_value(); -#if BOOST_VERSION >= 106700 - step_size_ = boost::integer::gcd(diff, step_size_); -#else - step_size_ = boost::math::gcd(diff, step_size_); -#endif - + step_size_ = std::gcd(diff, step_size_); minimum_value_ = min_value; slider_set_item_last(diff / step_size_); @@ -289,11 +279,8 @@ void slider::set_step_size(int step_size) const int range_diff = get_item_count() - 1; const int old_value = get_value(); -#if BOOST_VERSION >= 106700 - step_size_ = boost::integer::gcd(range_diff, step_size); -#else - step_size_ = boost::math::gcd(range_diff, step_size); -#endif + step_size_ = std::gcd(range_diff, step_size); + slider_set_item_last(range_diff / step_size_); set_value(old_value); diff --git a/src/log.cpp b/src/log.cpp index 8a071ed87c88..1b5216ae3fda 100644 --- a/src/log.cpp +++ b/src/log.cpp @@ -21,12 +21,11 @@ #include "log.hpp" -#include - #include #include #include #include +#include namespace { diff --git a/src/team.cpp b/src/team.cpp index 086301990eb6..508090b743ce 100644 --- a/src/team.cpp +++ b/src/team.cpp @@ -35,8 +35,6 @@ #include "units/types.hpp" #include "whiteboard/side_actions.hpp" -#include - static lg::log_domain log_engine("engine"); #define DBG_NG LOG_STREAM(debug, log_engine) #define LOG_NG LOG_STREAM(info, log_engine)