From a473d630eb165272992e90f8d854b1d66ec0be63 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 1 Jun 2011 16:50:12 +0000 Subject: Fix broken whitespace. I'd apologize for the compile times if it was my fault :D git-svn-id: svn://localhost/ardour2/branches/3.0@9654 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/port_set.cc | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'libs/ardour/port_set.cc') diff --git a/libs/ardour/port_set.cc b/libs/ardour/port_set.cc index 60f36d0f70..2105d184fb 100644 --- a/libs/ardour/port_set.cc +++ b/libs/ardour/port_set.cc @@ -36,34 +36,34 @@ static bool sort_ports_by_name (Port* a, Port* b) { string aname (a->name()); string bname (b->name()); - + string::size_type last_digit_position_a = aname.size(); string::reverse_iterator r_iterator = aname.rbegin(); - + while (r_iterator!= aname.rend() && Glib::Unicode::isdigit(*r_iterator)) { - r_iterator++; + r_iterator++; last_digit_position_a--; } - + string::size_type last_digit_position_b = bname.size(); r_iterator = bname.rbegin(); - + while (r_iterator != bname.rend() && Glib::Unicode::isdigit(*r_iterator)) { - r_iterator++; + r_iterator++; last_digit_position_b--; } - + // if some of the names don't have a number as posfix, compare as strings if (last_digit_position_a == aname.size() or last_digit_position_b == bname.size()) { return aname < bname; } - + const std::string prefix_a = aname.substr(0, last_digit_position_a - 1); const unsigned int posfix_a = std::atoi(aname.substr(last_digit_position_a, aname.size() - last_digit_position_a).c_str()); const std::string prefix_b = bname.substr(0, last_digit_position_b - 1); const unsigned int posfix_b = std::atoi(bname.substr(last_digit_position_b, bname.size() - last_digit_position_b).c_str()); - + if (prefix_a != prefix_b) { return aname < bname; } else { -- cgit v1.2.3