|
From: <pst...@us...> - 2011-07-27 14:22:19
|
Revision: 844
http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=844&view=rev
Author: pstieber
Date: 2011-07-27 14:22:13 +0000 (Wed, 27 Jul 2011)
Log Message:
-----------
Fixed drum set reading.
Modified Paths:
--------------
trunk/jazz/src/Configuration.cpp
Modified: trunk/jazz/src/Configuration.cpp
===================================================================
--- trunk/jazz/src/Configuration.cpp 2011-07-27 01:43:39 UTC (rev 843)
+++ trunk/jazz/src/Configuration.cpp 2011-07-27 14:22:13 UTC (rev 844)
@@ -917,6 +917,10 @@
int Value;
istringstream Iss(InputLine);
Iss >> Value;
+ if (Iss.fail())
+ {
+ cout << "Unable to read index." << endl;
+ }
if (gpConfig->GetValue(C_UseTwoCommandBankSelect))
{
@@ -928,6 +932,9 @@
}
mDrumSets[DrumsetIndex + 1].second = Value + 1;
+ string SetName;
+ Iss >> SetName;
+
string DrumSetName =
TNStringUtilities::TrimLeadingAndTrailingBlanks(Iss.str());
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pst...@us...> - 2011-08-05 20:37:38
|
Revision: 887
http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=887&view=rev
Author: pstieber
Date: 2011-08-05 20:37:32 +0000 (Fri, 05 Aug 2011)
Log Message:
-----------
Changed c_str() to wx_str() due to Microsoft template specializations.
Modified Paths:
--------------
trunk/jazz/src/Configuration.cpp
Modified: trunk/jazz/src/Configuration.cpp
===================================================================
--- trunk/jazz/src/Configuration.cpp 2011-08-05 20:33:45 UTC (rev 886)
+++ trunk/jazz/src/Configuration.cpp 2011-08-05 20:37:32 UTC (rev 887)
@@ -553,7 +553,7 @@
return false;
}
- ifstream Ifs(FileName.c_str());
+ ifstream Ifs(FileName.wx_str());
if (!Ifs)
{
return false;
@@ -642,7 +642,7 @@
return false;
}
- ifstream Ifs(FileName.c_str());
+ ifstream Ifs(FileName.wx_str());
if (!Ifs)
{
return false;
@@ -734,7 +734,7 @@
<< " \"" << mFileName << '"'
<< endl;
- ifstream* pIs = new ifstream(mFileName.c_str());
+ ifstream* pIs = new ifstream(mFileName.wx_str());
InputFileStreams.push(pIs);
if (!*InputFileStreams.top())
@@ -848,7 +848,7 @@
}
else
{
- pIs = new ifstream(IncludeFileName.c_str());
+ pIs = new ifstream(IncludeFileName.wx_str());
InputFileStreams.push(pIs);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pst...@us...> - 2011-08-08 00:14:01
|
Revision: 904
http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=904&view=rev
Author: pstieber
Date: 2011-08-08 00:13:55 +0000 (Mon, 08 Aug 2011)
Log Message:
-----------
Added empty input line tests.
Modified Paths:
--------------
trunk/jazz/src/Configuration.cpp
Modified: trunk/jazz/src/Configuration.cpp
===================================================================
--- trunk/jazz/src/Configuration.cpp 2011-08-08 00:13:00 UTC (rev 903)
+++ trunk/jazz/src/Configuration.cpp 2011-08-08 00:13:55 UTC (rev 904)
@@ -869,7 +869,7 @@
break;
}
}
- else if (pVector && isdigit(InputLine[0]))
+ else if (pVector && !InputLine.empty() && isdigit(InputLine[0]))
{
// Read named entries.
@@ -985,7 +985,11 @@
::wxMessageBox(String, "Warning", wxOK);
}
}
- else if (pVector == 0 && !mBankTable.empty()&& isdigit(InputLine[0]))
+ else if (
+ pVector == 0 &&
+ !mBankTable.empty() &&
+ !InputLine.empty() &&
+ isdigit(InputLine[0]))
{
// Read bank table entries.
assert(0 <= BankIndex && BankIndex < mBankTable.size());
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pst...@us...> - 2013-01-06 22:53:50
|
Revision: 943
http://sourceforge.net/p/jazzplusplus/code/943
Author: pstieber
Date: 2013-01-06 22:53:47 +0000 (Sun, 06 Jan 2013)
Log Message:
-----------
Changed the way the "none string" was initialized.
Modified Paths:
--------------
trunk/jazz/src/Configuration.cpp
Modified: trunk/jazz/src/Configuration.cpp
===================================================================
--- trunk/jazz/src/Configuration.cpp 2013-01-06 22:49:35 UTC (rev 942)
+++ trunk/jazz/src/Configuration.cpp 2013-01-06 22:53:47 UTC (rev 943)
@@ -304,7 +304,7 @@
mDrumNames.push_back(make_pair("", i));
}
- const string NoneString = "None";
+ const string NoneString("None");
mDrumSets.push_back(make_pair(NoneString, 0));
for (int i = 1; i < 130; ++i)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pst...@us...> - 2013-04-07 23:54:37
|
Revision: 1018
http://sourceforge.net/p/jazzplusplus/code/1018
Author: pstieber
Date: 2013-04-07 23:54:34 +0000 (Sun, 07 Apr 2013)
Log Message:
-----------
Fixed reading of voice, drum set, and drum names.
Modified Paths:
--------------
trunk/jazz/src/Configuration.cpp
Modified: trunk/jazz/src/Configuration.cpp
===================================================================
--- trunk/jazz/src/Configuration.cpp 2013-04-07 23:43:22 UTC (rev 1017)
+++ trunk/jazz/src/Configuration.cpp 2013-04-07 23:54:34 UTC (rev 1018)
@@ -863,10 +863,11 @@
mVoiceNames[VoiceIndex + 1].second = Value + 1;
- string VoiceName =
- TNStringUtilities::TrimLeadingAndTrailingBlanks(Iss.str());
+ string VoiceName;
+ getline(Iss, VoiceName);
- mVoiceNames[VoiceIndex + 1].first = VoiceName;
+ mVoiceNames[VoiceIndex + 1].first =
+ TNStringUtilities::TrimLeadingAndTrailingBlanks(VoiceName);
++VoiceIndex;
}
@@ -903,13 +904,11 @@
mDrumSets[DrumsetIndex + 1].second = Value + 1;
string SetName;
- Iss >> SetName;
+ getline(Iss, SetName);
- string DrumSetName =
- TNStringUtilities::TrimLeadingAndTrailingBlanks(Iss.str());
+ mDrumSets[DrumsetIndex + 1].first =
+ TNStringUtilities::TrimLeadingAndTrailingBlanks(SetName);
- mDrumSets[DrumsetIndex + 1].first = DrumSetName;
-
++DrumsetIndex;
}
else
@@ -941,10 +940,11 @@
Iss >> i;
assert(0 <= i && i <= 127);
- string DrumName =
- TNStringUtilities::TrimLeadingAndTrailingBlanks(Iss.str());
+ string DrumName;
+ getline(Iss, DrumName);
- mDrumNames[i + 1].first = DrumName;
+ mDrumNames[i + 1].first =
+ TNStringUtilities::TrimLeadingAndTrailingBlanks(DrumName);
}
else
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|