Use PBD::string_to_uint32 in Playlist class instead of boost::lexical_cast
authorTim Mayberry <mojofunk@gmail.com>
Tue, 4 Apr 2017 07:54:52 +0000 (17:54 +1000)
committerTim Mayberry <mojofunk@gmail.com>
Tue, 18 Apr 2017 23:37:02 +0000 (09:37 +1000)
libs/ardour/playlist.cc

index 2ff6c431d13449c530643c728c487c48812c24b1..b7ff71068b30723badbde816953835937e215a6f 100644 (file)
@@ -22,8 +22,6 @@
 #include <algorithm>
 #include <string>
 
-#include <boost/lexical_cast.hpp>
-
 #include "pbd/types_convert.h"
 #include "pbd/stateful_diff_command.h"
 #include "pbd/strsplit.h"
@@ -362,11 +360,7 @@ Playlist::_set_sort_id ()
        } else {
                string t = _name.val().substr(dot_position + 1);
 
-               try {
-                       _sort_id = boost::lexical_cast<int>(t);
-               }
-
-               catch (boost::bad_lexical_cast e) {
+               if (!string_to_uint32 (t, _sort_id)) {
                        _sort_id = 0;
                }
        }