From: Adam Dickmeiss Date: Mon, 29 Oct 2012 13:19:50 +0000 (+0100) Subject: Avoid boost::is_any_off to avoid warning X-Git-Tag: v1.3.50~2 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=db24db82188d7971d6e918d0e4546b31b7395aff;p=metaproxy-moved-to-github.git Avoid boost::is_any_off to avoid warning Actually a big fat warning only issued with Visual Studio. --- diff --git a/src/filter_auth_simple.cpp b/src/filter_auth_simple.cpp index c2d677f..be710dc 100644 --- a/src/filter_auth_simple.cpp +++ b/src/filter_auth_simple.cpp @@ -22,7 +22,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include #include -#include #include #include "filter_auth_simple.hpp" @@ -137,6 +136,17 @@ void mp::filter::AuthSimple::configure(const xmlNode * ptr, bool test_only, config_targetRegister(targetRegisterName); } +static void split_db(std::list &dbs, + const char *databasesp) +{ + const char *cp; + while ((cp = strchr(databasesp, ','))) + { + dbs.push_back(std::string(databasesp, cp - databasesp)); + databasesp = cp + 1; + } + dbs.push_back(std::string(databasesp)); +} void mp::filter::AuthSimple::config_userRegister(std::string filename) { @@ -162,7 +172,7 @@ void mp::filter::AuthSimple::config_userRegister(std::string filename) "no databases on line: '" + buf + ":" + passwdp + "'"); *databasesp++ = 0; yf::AuthSimple::Rep::PasswordAndDBs tmp(passwdp); - boost::split(tmp.dbs, databasesp, boost::is_any_of(",")); + split_db(tmp.dbs, databasesp); m_p->userRegister[buf] = tmp; if (0) @@ -198,7 +208,7 @@ void mp::filter::AuthSimple::config_targetRegister(std::string filename) "no targets on line: '" + buf + "'"); *targetsp++ = 0; std::list tmp; - boost::split(tmp, targetsp, boost::is_any_of(",")); + split_db(tmp, targetsp); m_p->targetsByUser[buf] = tmp; if (0) { // debugging