|
From: Lasse Kärkkäi. <tr...@us...> - 2010-05-22 17:17:24
|
Module: performous
Branch: master
Commit: be4c165aeeb2740b0f1cccada27b5a24db5c3750
Author: Lasse Karkkainen <tro...@tr...>
Date: Sat May 22 20:16:33 2010 +0300
Fix clang++ compile error (ambiguous overload of boost::thread) and warnings (struct vs. class). Compilation still broken due to OpenCV bugs (in the library, not Performous) and I didn't manage to link the C++ standard library correctly yet.
---
game/configuration.hh | 2 +-
game/engine.hh | 2 +-
game/theme.hh | 19 ++++++++++++-------
game/video_driver.hh | 2 +-
4 files changed, 15 insertions(+), 10 deletions(-)
diff --git a/game/configuration.hh b/game/configuration.hh
index 533e667..4539154 100644
--- a/game/configuration.hh
+++ b/game/configuration.hh
@@ -5,7 +5,7 @@
#include <string>
#include <vector>
-namespace xmlpp { struct Element; } // Forward declaration for libxml++ stuff
+namespace xmlpp { class Element; } // Forward declaration for libxml++ stuff
/// configuration option
class ConfigItem {
diff --git a/game/engine.hh b/game/engine.hh
index f1c7882..a164931 100644
--- a/game/engine.hh
+++ b/game/engine.hh
@@ -54,7 +54,7 @@ class Engine {
size_t player = 0;
for (std::list<Player>::iterator it = m_database.cur.begin(); it != m_database.cur.end(); ++it, ++player) it->m_color = playerColors[player % playerColorsSize];
}
- m_thread.reset(new boost::thread(boost::ref(*this)));
+ m_thread.reset(new boost::thread(&Engine::operator(), this));
}
~Engine() { kill(); }
/// Terminates processing
diff --git a/game/theme.hh b/game/theme.hh
index 7594cf0..12b8640 100755
--- a/game/theme.hh
+++ b/game/theme.hh
@@ -7,16 +7,17 @@
/// abstract theme class
class Theme: boost::noncopyable {
- protected:
+protected:
Theme();
Theme(const std::string path); ///< creates theme from path
- public:
+public:
/// background image for theme
Surface bg;
};
/// theme for song selection
-struct ThemeSongs: Theme {
+class ThemeSongs: public Theme {
+public:
ThemeSongs();
/// song display
SvgTxtTheme song;
@@ -29,7 +30,8 @@ struct ThemeSongs: Theme {
};
/// theme for practice screen
-struct ThemePractice: Theme {
+class ThemePractice: public Theme {
+public:
ThemePractice();
/// note
Surface note;
@@ -40,7 +42,8 @@ struct ThemePractice: Theme {
};
/// theme for singing screen
-struct ThemeSing: Theme {
+class ThemeSing: public Theme {
+public:
ThemeSing();
/// top background
Surface bg_top;
@@ -55,7 +58,8 @@ struct ThemeSing: Theme {
};
/// theme for options screen
-struct ThemeConfiguration: Theme {
+class ThemeConfiguration: public Theme {
+public:
ThemeConfiguration();
/// configuration item
SvgTxtTheme item;
@@ -72,7 +76,8 @@ struct ThemeConfiguration: Theme {
};
/// theme for intro screen
-struct ThemeIntro: Theme {
+class ThemeIntro: public Theme {
+public:
ThemeIntro();
/// back highlight for selected option
Surface back_h;
diff --git a/game/video_driver.hh b/game/video_driver.hh
index 4ac703e..c865815 100644
--- a/game/video_driver.hh
+++ b/game/video_driver.hh
@@ -4,7 +4,7 @@ unsigned int screenW();
unsigned int screenH();
static inline float virtH() { return float(screenH()) / screenW(); }
-class SDL_Surface;
+struct SDL_Surface;
/// handles the window
class Window {
|