summaryrefslogtreecommitdiff
path: root/libs/midi++2/midnam_patch.cc
diff options
context:
space:
mode:
authorTim Mayberry <mojofunk@gmail.com>2015-10-19 20:18:16 +1000
committerPaul Davis <paul@linuxaudiosystems.com>2015-10-22 11:51:03 -0400
commitefc26a049063ec9b7f81ab89fbe9b8fdcfd18233 (patch)
treeb1bea9b9e28cd93e7c43489daa977a3caab5ba24 /libs/midi++2/midnam_patch.cc
parent689862cafb0333978268e21b08670d07255ccb99 (diff)
Store the file path when constructing MidiNameDocument
This is so we can compare and see if we have already parsed the file
Diffstat (limited to 'libs/midi++2/midnam_patch.cc')
-rw-r--r--libs/midi++2/midnam_patch.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/libs/midi++2/midnam_patch.cc b/libs/midi++2/midnam_patch.cc
index 2205e5e2a0..cb1e28508b 100644
--- a/libs/midi++2/midnam_patch.cc
+++ b/libs/midi++2/midnam_patch.cc
@@ -877,14 +877,15 @@ MasterDeviceNames::get_state(void)
return nothing;
}
-MIDINameDocument::MIDINameDocument (const string& filename)
+MIDINameDocument::MIDINameDocument (const string& file_path)
+ : _file_path(file_path)
{
XMLTree document;
- if (!document.read (filename)) {
+ if (!document.read (file_path)) {
throw failed_constructor ();
}
- document.set_filename (filename);
+ document.set_filename (file_path);
set_state (document, *document.root());
}