mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-27 06:55:54 -04:00
Add preprocessor check to determine which common_factor header to use.
This commit is contained in:
parent
c68ccbc6b6
commit
cd4303da23
@ -1,6 +1,10 @@
|
||||
#include "graphicspage.hpp"
|
||||
|
||||
#if BOOST_VERSION >= 106500
|
||||
#include <boost/integer/common_factor.hpp>
|
||||
#else
|
||||
#include <boost/math/common_factor.hpp>
|
||||
#endif
|
||||
#include <csignal>
|
||||
#include <QDesktopWidget>
|
||||
#include <QMessageBox>
|
||||
@ -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
|
||||
|
@ -8,7 +8,11 @@
|
||||
#include <MyGUI_TabControl.h>
|
||||
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#if BOOST_VERSION >= 106500
|
||||
#include <boost/integer/common_factor.hpp>
|
||||
#else
|
||||
#include <boost/math/common_factor.hpp>
|
||||
#endif
|
||||
|
||||
#include <SDL_video.h>
|
||||
|
||||
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user