Fix two compiler warnings

* cutscene: comparison between unsigned and signed int
 * graph: simplify the comparison being made


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11361 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
wardje 2012-07-02 19:11:12 +00:00
parent 7e52b5f381
commit 7b5d9e50a4
2 changed files with 3 additions and 3 deletions

View File

@ -154,7 +154,7 @@ void CutsceneWorld::update(float dt)
float currFrame = m_time * 30.0f; // We assume 30 FPS
const std::vector<Subtitle>& subtitles = m_track->getSubtitles();
bool foundSubtitle = false;
for (int n = 0; n < subtitles.size(); n++)
for (unsigned int n = 0; n < subtitles.size(); n++)
{
if (currFrame >= subtitles[n].getFrom() && currFrame < subtitles[n].getTo())
{
@ -272,4 +272,4 @@ void CutsceneWorld::createRaceGUI()
m_race_gui = new CutsceneGUI();
}

View File

@ -31,7 +31,7 @@
*/
GraphNode::GraphNode(unsigned int quad_index, unsigned int node_index)
{
if (quad_index<QuadSet::get()->getNumberOfQuads() == 0)
if (quad_index >= QuadSet::get()->getNumberOfQuads())
{
fprintf(stderr, "[GraphNode] ERROR: No driveline found, or empty driveline");
abort();