|
From: Lasse Kärkkäi. <tr...@us...> - 2009-11-14 18:44:40
|
Module: performous
Branch: dance
Commit: 9ca9f60972693603d9b196d511adc98c957f4968
Author: Tapio Vierros <tap...@gm...>
Date: Thu Nov 12 23:43:14 2009 +0200
Only warn about overlapping notes in TXT file.
---
game/songparser-txt.cc | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/game/songparser-txt.cc b/game/songparser-txt.cc
index 9ba1c67..e2d32fa 100644
--- a/game/songparser-txt.cc
+++ b/game/songparser-txt.cc
@@ -134,7 +134,12 @@ bool SongParser::txtParseNote(std::string line) {
}
// Can we just make the previous note shorter?
if (p.begin <= n.begin) p.end = n.begin;
- else throw std::runtime_error("Note overlaps with earlier notes");
+ else { // Nothing to do, warn and skip
+ std::ostringstream oss;
+ oss << "WARNING: Skipping overlapping note in " << m_song.path << m_song.filename << std::endl;
+ std::cerr << oss.str(); // More likely to be atomic when written as one string
+ return true;
+ }
} else throw std::runtime_error("The first note has negative timestamp");
}
double prevtime = m_prevtime;
|