EmulationStation: fix gcc6 build

This commit is contained in:
Juergen Buchmueller 2016-09-15 10:38:23 +02:00
parent 0564554608
commit b5db950da6
3 changed files with 46 additions and 1 deletions

View file

@ -0,0 +1,13 @@
Explicit cast to float to avoid ambiguity.
--- es-core/src/components/HelpComponent.cpp 2016-03-13 20:31:00.000000000 +0100
+++ es-core/src/components/HelpComponent.cpp 2016-09-15 10:28:21.700078076 +0200
@@ -71,7 +71,7 @@
std::vector< std::shared_ptr<TextComponent> > labels;
float width = 0;
- const float height = round(font->getLetterHeight() * 1.25f);
+ const float height = round(static_cast<float>(font->getLetterHeight() * 1.25f));
for(auto it = mPrompts.begin(); it != mPrompts.end(); it++)
{
auto icon = std::make_shared<ImageComponent>(mWindow);

View file

@ -0,0 +1,32 @@
Also needs to check if _MSC_VER is defined at all.
--- es-core/src/Util.h 2016-03-13 20:31:00.000000000 +0100
+++ es-core/src/Util.h 2016-09-15 10:33:18.964427356 +0200
@@ -15,7 +15,7 @@
Eigen::Vector3f roundVector(const Eigen::Vector3f& vec);
Eigen::Vector2f roundVector(const Eigen::Vector2f& vec);
-#if _MSC_VER < 1800
+#if defined(_MSC_VER) && (_MSC_VER < 1800)
float round(float num);
#endif /* _MSC_VER */
--- es-core/src/Util.cpp 2016-03-13 20:31:00.000000000 +0100
+++ es-core/src/Util.cpp 2016-09-15 10:36:10.972624004 +0200
@@ -32,14 +32,14 @@
}
-#if _MSC_VER < 1800
+#if defined(_MSC_VER) && (_MSC_VER < 1800)
float round(float num)
{
return (float)((int)(num + 0.5f));
}
#endif
-#if _MSC_VER >= 1700
+#if defined(_MSC_VER) && (_MSC_VER >= 1700)
FILE iob[] = {*stdin, *stdout, *stderr };
FILE * __iob_func(void)
{

View file

@ -1,7 +1,7 @@
# Template file for 'EmulationStation'
pkgname=EmulationStation
version=2.0.1a
revision=1
revision=2
_githash=93f6e11c95f9e7a0c00d3a70c744b22d9a931127
build_style=cmake
hostmakedepends="cmake"