From e65903a49a7e00e220149aa011704bdb66939f7e Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sun, 27 Sep 2015 16:10:10 +0200 Subject: 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). --- libs/ardour/io.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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::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::const_iterator ci; + std::sort (connections.begin(), connections.end()); for (n = 0, ci = connections.begin(); ci != connections.end(); ++ci, ++n) { -- cgit v1.2.3