mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-14 06:48:40 -04:00
Merge branch 'boost-gcd-deprecation' into 'master'
Fix boost deprecation warning See merge request OpenMW/openmw!66
This commit is contained in:
commit
735bcf17c2
@ -1,6 +1,10 @@
|
|||||||
#include "graphicspage.hpp"
|
#include "graphicspage.hpp"
|
||||||
|
|
||||||
|
#if BOOST_VERSION >= 106500
|
||||||
|
#include <boost/integer/common_factor.hpp>
|
||||||
|
#else
|
||||||
#include <boost/math/common_factor.hpp>
|
#include <boost/math/common_factor.hpp>
|
||||||
|
#endif
|
||||||
#include <csignal>
|
#include <csignal>
|
||||||
#include <QDesktopWidget>
|
#include <QDesktopWidget>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
@ -18,7 +22,11 @@
|
|||||||
|
|
||||||
QString getAspect(int x, int y)
|
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);
|
int gcd = boost::math::gcd (x, y);
|
||||||
|
#endif
|
||||||
int xaspect = x / gcd;
|
int xaspect = x / gcd;
|
||||||
int yaspect = y / gcd;
|
int yaspect = y / gcd;
|
||||||
// special case: 8 : 5 is usually referred to as 16:10
|
// special case: 8 : 5 is usually referred to as 16:10
|
||||||
|
@ -8,7 +8,11 @@
|
|||||||
#include <MyGUI_TabControl.h>
|
#include <MyGUI_TabControl.h>
|
||||||
|
|
||||||
#include <boost/algorithm/string.hpp>
|
#include <boost/algorithm/string.hpp>
|
||||||
|
#if BOOST_VERSION >= 106500
|
||||||
|
#include <boost/integer/common_factor.hpp>
|
||||||
|
#else
|
||||||
#include <boost/math/common_factor.hpp>
|
#include <boost/math/common_factor.hpp>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <SDL_video.h>
|
#include <SDL_video.h>
|
||||||
|
|
||||||
@ -59,7 +63,11 @@ namespace
|
|||||||
|
|
||||||
std::string getAspect (int x, int y)
|
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);
|
int gcd = boost::math::gcd (x, y);
|
||||||
|
#endif
|
||||||
int xaspect = x / gcd;
|
int xaspect = x / gcd;
|
||||||
int yaspect = y / gcd;
|
int yaspect = y / gcd;
|
||||||
// special case: 8 : 5 is usually referred to as 16:10
|
// special case: 8 : 5 is usually referred to as 16:10
|
||||||
|
Loading…
x
Reference in New Issue
Block a user