diff options
author | André Nusser <andre.nusser@googlemail.com> | 2016-03-23 15:59:41 +0100 |
---|---|---|
committer | André Nusser <andre.nusser@googlemail.com> | 2016-03-23 15:59:41 +0100 |
commit | e8fcde7654f2d7dce494ebe1ca27abbebc3908b4 (patch) | |
tree | 42ee68e66205d6d4751f6bcd071df440ed62a245 /src/midimapparser.cc | |
parent | 04e088e65942b7f6fdd80c4e54768dca987ff9d7 (diff) |
Make attr a const ref.
Diffstat (limited to 'src/midimapparser.cc')
-rw-r--r-- | src/midimapparser.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/midimapparser.cc b/src/midimapparser.cc index f66d063..e847c58 100644 --- a/src/midimapparser.cc +++ b/src/midimapparser.cc @@ -39,13 +39,13 @@ MidiMapParser::~MidiMapParser() } } -void MidiMapParser::startTag(const std::string& name, attr_t& attr) +void MidiMapParser::startTag(const std::string& name, const attr_t& attr) { if(name == "map") { if(attr.find("note") != attr.end() && attr.find("instr") != attr.end()) { - midimap[std::stoi(attr["note"])] = attr["instr"]; + midimap[std::stoi(attr.at("note"))] = attr.at("instr"); } } } |