summaryrefslogtreecommitdiff
path: root/src/midimapparser.cc
diff options
context:
space:
mode:
authorAndré Nusser <andre.nusser@googlemail.com>2016-03-23 15:59:41 +0100
committerAndré Nusser <andre.nusser@googlemail.com>2016-03-29 22:19:49 +0200
commit01e216f82e24e7668a892e5a912ccbf1369ae255 (patch)
treec5e8775db8ba1626a3268c96bac993282bd4ebf5 /src/midimapparser.cc
parent0930fdc014bf36fb9e2715b3d14bff5fedf354a9 (diff)
Make attr a const ref.
Diffstat (limited to 'src/midimapparser.cc')
-rw-r--r--src/midimapparser.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/midimapparser.cc b/src/midimapparser.cc
index 2d4563a..38a4124 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");
}
}
}