Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/libs/pbd/debug.cc b/libs/pbd/debug.cc
- index 2fcbc1f510..42434ef4be 100644
- --- a/libs/pbd/debug.cc
- +++ b/libs/pbd/debug.cc
- @@ -26,8 +26,11 @@
- #include <map>
- #include <vector>
- #include <algorithm>
- +#include <sstream>
- -#include <boost/tokenizer.hpp>
- +#ifdef PLATFORM_WINDOWS
- +#define strncasecmp _strnicmp
- +#endif
- #include "pbd/debug.h"
- #include "pbd/error.h"
- @@ -130,23 +133,26 @@ int
- PBD::parse_debug_options (const char* str)
- {
- string in_str = str;
- - typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
- - boost::char_separator<char> sep (",");
- - tokenizer tokens (in_str, sep);
- + std::vector<std::string> tokens;
- + std::stringstream ss(in_str);
- + std::string token;
- + while (std::getline(ss, token, ',')) {
- + tokens.push_back(token);
- + }
- - for (tokenizer::iterator tok_iter = tokens.begin(); tok_iter != tokens.end(); ++tok_iter) {
- - if (*tok_iter == "list") {
- + for (auto const& tok : tokens) {
- + if (tok == "list") {
- list_debug_options ();
- return 1;
- }
- - if (*tok_iter == "all") {
- + if (tok == "all") {
- debug_bits.set (); /* sets all bits */
- return 0;
- }
- for (map<const char*,DebugBits>::iterator i = _debug_bit_map().begin(); i != _debug_bit_map().end(); ++i) {
- - const char* cstr = (*tok_iter).c_str();
- + const char* cstr = tok.c_str();
- if (strncasecmp (cstr, i->first, strlen (cstr)) == 0) {
- debug_bits |= i->second;
Advertisement
Add Comment
Please, Sign In to add comment