|
From: Yoda-JM <yo...@us...> - 2009-10-29 10:49:19
|
Module: performous
Branch: master
Commit: ec301334c628ed44a89e4009d10588b01903bec2
Author: Vincent Le Ligeour <yo...@us...>
Date: Thu Oct 29 11:49:04 2009 +0100
Fixed some MacOSX compilation/runtime errors
---
cmake/performous.sh.cmake | 2 +-
game/player.cc | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/cmake/performous.sh.cmake b/cmake/performous.sh.cmake
index 06a4c9e..a8896b2 100644
--- a/cmake/performous.sh.cmake
+++ b/cmake/performous.sh.cmake
@@ -1,4 +1,4 @@
#!/bin/sh
-env LD_LIBRARY_PATH='@CMAKE_INSTALL_PREFIX@/lib@LIB_SUFFIX@:$LD_LIBRARY_PATH' PERFORMOUS_DATA_DIR='@CMAKE_INSTALL_PREFIX@/@SHARE_INSTALL@' PLUGIN_PATH='@PERFORMOUS_PLUGIN_PATH@' '@PERFORMOUS_EXECUTABLE@' "$@"
+env DYLD_LIBRARY_PATH='@CMAKE_INSTALL_PREFIX@/lib@LIB_SUFFIX@:$DYLD_LIBRARY_PATH' LD_LIBRARY_PATH='@CMAKE_INSTALL_PREFIX@/lib@LIB_SUFFIX@:$LD_LIBRARY_PATH' PERFORMOUS_DATA_DIR='@CMAKE_INSTALL_PREFIX@/@SHARE_INSTALL@' PLUGIN_PATH='@PERFORMOUS_PLUGIN_PATH@' '@PERFORMOUS_EXECUTABLE@' "$@"
diff --git a/game/player.cc b/game/player.cc
index 5a71639..e5dcfdf 100644
--- a/game/player.cc
+++ b/game/player.cc
@@ -27,7 +27,8 @@ void Player::update() {
m_prevLineScore = m_lineScore;
// Calculate max score of the completed row
Notes::const_reverse_iterator maxScoreIt(m_scoreIt);
- while (maxScoreIt != m_song.notes.rend() && maxScoreIt->type != Note::SLEEP) {
+ // FIXME: MacOSX needs the following cast to compile correctly
+ while ((maxScoreIt != (Notes::const_reverse_iterator)m_song.notes.rend()) && (maxScoreIt->type != Note::SLEEP)) {
m_maxLineScore += m_song.m_scoreFactor * maxScoreIt->maxScore();
maxScoreIt++;
}
|