From 89d4d3be08c9bb4e8c1c4f7134b94a7b13a49d82 Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Wed, 13 Feb 2019 14:49:36 +0000 Subject: [PATCH 1/3] Fix boost deprecation warning --- apps/openmw/mwgui/settingswindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwgui/settingswindow.cpp b/apps/openmw/mwgui/settingswindow.cpp index 6e6924f28e..2b7dbc67dc 100644 --- a/apps/openmw/mwgui/settingswindow.cpp +++ b/apps/openmw/mwgui/settingswindow.cpp @@ -8,7 +8,7 @@ #include #include -#include +#include #include @@ -58,7 +58,7 @@ namespace std::string getAspect (int x, int y) { - int gcd = boost::math::gcd (x, y); + int gcd = boost::integer::gcd (x, y); int xaspect = x / gcd; int yaspect = y / gcd; // special case: 8 : 5 is usually referred to as 16:10 From c68ccbc6b69d07370387056974fd05e595103142 Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Wed, 13 Feb 2019 18:37:01 +0000 Subject: [PATCH 2/3] Use new common_factor header in the launcher, too --- apps/launcher/graphicspage.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/launcher/graphicspage.cpp b/apps/launcher/graphicspage.cpp index 072f1f36f2..7424555132 100644 --- a/apps/launcher/graphicspage.cpp +++ b/apps/launcher/graphicspage.cpp @@ -1,6 +1,6 @@ #include "graphicspage.hpp" -#include +#include #include #include #include @@ -18,7 +18,7 @@ QString getAspect(int x, int y) { - int gcd = boost::math::gcd (x, y); + int gcd = boost::integer::gcd (x, y); int xaspect = x / gcd; int yaspect = y / gcd; // special case: 8 : 5 is usually referred to as 16:10 From cd4303da23280ac4c10f297d6b4225a3c026372e Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Tue, 26 Feb 2019 17:03:07 +0000 Subject: [PATCH 3/3] Add preprocessor check to determine which common_factor header to use. --- apps/launcher/graphicspage.cpp | 8 ++++++++ apps/openmw/mwgui/settingswindow.cpp | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/apps/launcher/graphicspage.cpp b/apps/launcher/graphicspage.cpp index 7424555132..18f744932d 100644 --- a/apps/launcher/graphicspage.cpp +++ b/apps/launcher/graphicspage.cpp @@ -1,6 +1,10 @@ #include "graphicspage.hpp" +#if BOOST_VERSION >= 106500 #include +#else +#include +#endif #include #include #include @@ -18,7 +22,11 @@ QString getAspect(int x, int y) { +#if BOOST_VERSION >= 106500 int gcd = boost::integer::gcd (x, y); +#else + int gcd = boost::math::gcd (x, y); +#endif int xaspect = x / gcd; int yaspect = y / gcd; // special case: 8 : 5 is usually referred to as 16:10 diff --git a/apps/openmw/mwgui/settingswindow.cpp b/apps/openmw/mwgui/settingswindow.cpp index 2b7dbc67dc..d06b4c5826 100644 --- a/apps/openmw/mwgui/settingswindow.cpp +++ b/apps/openmw/mwgui/settingswindow.cpp @@ -8,7 +8,11 @@ #include #include +#if BOOST_VERSION >= 106500 #include +#else +#include +#endif #include @@ -58,7 +62,11 @@ namespace std::string getAspect (int x, int y) { +#if BOOST_VERSION >= 106500 int gcd = boost::integer::gcd (x, y); +#else + int gcd = boost::math::gcd (x, y); +#endif int xaspect = x / gcd; int yaspect = y / gcd; // special case: 8 : 5 is usually referred to as 16:10