diff options
author | Robin Gareus <robin@gareus.org> | 2015-09-27 16:10:10 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2015-09-27 16:10:10 +0200 |
commit | e65903a49a7e00e220149aa011704bdb66939f7e (patch) | |
tree | 9f8c13a00deb4f9e9d7760c764fcd40fa9faaf45 | |
parent | ed2ce36735754b822e65d5cae8ac7b17ed6938be (diff) |
Sort ports in state-save.
This results in identical XML if the session did not change, allowing
to keep track of state-changes easily (e.g. session file in git).
Thanks to deva (again).
-rw-r--r-- | libs/ardour/io.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libs/ardour/io.cc b/libs/ardour/io.cc index 82d4bd03e5..c69006c745 100644 --- a/libs/ardour/io.cc +++ b/libs/ardour/io.cc @@ -526,7 +526,6 @@ IO::state (bool /*full_state*/) XMLNode* node = new XMLNode (state_node_name); char buf[64]; string str; - vector<string>::iterator ci; int n; LocaleGuard lg (X_("C")); Glib::Threads::Mutex::Lock lm (io_lock); @@ -552,6 +551,8 @@ IO::state (bool /*full_state*/) pnode->add_property (X_("name"), i->name()); if (i->get_connections (connections)) { + vector<string>::const_iterator ci; + std::sort (connections.begin(), connections.end()); for (n = 0, ci = connections.begin(); ci != connections.end(); ++ci, ++n) { |