diff options
author | André Nusser <andre.nusser@googlemail.com> | 2016-03-23 18:24:29 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2016-03-29 22:43:31 +0200 |
commit | ef1d7e4478649296ccb17900acc949a604097d66 (patch) | |
tree | 52660b7d9d96b8bef165429c50c2a89084cae141 /src/midimapparser.cc | |
parent | 390f6f094d43f0d8cfca4efff13d002eb4cf6f19 (diff) |
Do the file related actions in SAXParser.
Diffstat (limited to 'src/midimapparser.cc')
-rw-r--r-- | src/midimapparser.cc | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/src/midimapparser.cc b/src/midimapparser.cc index 38a4124..ec4c10d 100644 --- a/src/midimapparser.cc +++ b/src/midimapparser.cc @@ -26,19 +26,6 @@ */ #include "midimapparser.h" -MidiMapParser::MidiMapParser(const std::string& file) -{ - fd = fopen(file.c_str(), "r"); -} - -MidiMapParser::~MidiMapParser() -{ - if(fd) - { - fclose(fd); - } -} - void MidiMapParser::startTag(const std::string& name, const attr_t& attr) { if(name == "map") @@ -49,16 +36,3 @@ void MidiMapParser::startTag(const std::string& name, const attr_t& attr) } } } - -int MidiMapParser::readData(std::string& data, std::size_t size) -{ - if(!fd) - { - return -1; - } - - data.resize(size); - auto nr_of_bytes_read = fread((void*)data.data(), 1, size, fd); - data.resize(nr_of_bytes_read); - return nr_of_bytes_read; -} |