Refactored song loading
~9% faster and a bit more stable
This commit is contained in:
1 parent
9c78bbe45f
commit
9761c115b2
4 files changed
+159
-157
No files matched your search
@@ -58,12 +58,13 @@ namespace Vocaluxe.Menu
|
||||
|
||||
try
|
||||
{
|
||||
chr = (char)sr.Peek();
|
||||
while ((chr.CompareTo(' ') != 0) && ((int)chr != 19) && ((int)chr != 16) && ((int)chr != 13))
|
||||
int tmp = sr.Peek();
|
||||
//Check for ' ', ?, ?, \n, \r
|
||||
while (tmp != 32 && tmp != 19 && tmp != 16 && tmp != 13 && tmp != 10)
|
||||
{
|
||||
chr = (char)sr.Read();
|
||||
value += chr.ToString();
|
||||
chr = (char)sr.Peek();
|
||||
tmp = sr.Peek();
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
|
||||
Reference in new issue
Block a user