diff options
author | André Nusser <andre.nusser@googlemail.com> | 2016-03-22 00:40:15 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2016-03-31 20:41:11 +0200 |
commit | d172d756cfcdfbde5c6b8c6d25a51f58624739e6 (patch) | |
tree | 58cec8320d65f5cd0abfc8ef62b57e562ae41ffb | |
parent | c7aae008ad818f9cb453ce184673e0edf8ba4e58 (diff) |
Parser refactoring.
* Use new style
* Update to C++11
* Use more std::string than char*
-rw-r--r-- | src/drumkitparser.cc | 6 | ||||
-rw-r--r-- | src/instrumentparser.cc | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/drumkitparser.cc b/src/drumkitparser.cc index 3ba69c8..a538996 100644 --- a/src/drumkitparser.cc +++ b/src/drumkitparser.cc @@ -36,7 +36,7 @@ DrumKitParser::DrumKitParser(DrumKit& kit) : kit(kit) - , refs(REFSFILE) + , refs(REFSFILE) { } @@ -101,7 +101,7 @@ void DrumKitParser::startTag(const std::string& name, const attr_t& attr) { ERR(kitparser, "Error parsing version number: %s, using 1.0\n", err); kit._version = VersionStr(1,0,0); - } + } } else { @@ -112,7 +112,7 @@ void DrumKitParser::startTag(const std::string& name, const attr_t& attr) if(name == "channels") { - + } if(name == "channel") diff --git a/src/instrumentparser.cc b/src/instrumentparser.cc index 268f8f3..8bcb7a0 100644 --- a/src/instrumentparser.cc +++ b/src/instrumentparser.cc @@ -71,7 +71,7 @@ void InstrumentParser::startTag(const std::string& name, const attr_t& attr) { ERR(instrparser, "Error parsing version number: %s, using 1.0\n", err); instrument.version = VersionStr(1,0,0); - } + } } else { @@ -93,10 +93,10 @@ void InstrumentParser::startTag(const std::string& name, const attr_t& attr) return; } - float power; + float power; if(attr.find("power") == attr.end()) { - power = -1; + power = -1; } else { |