diff options
Diffstat (limited to 'cpp/src/qpid/log/Selector.cpp')
| -rw-r--r-- | cpp/src/qpid/log/Selector.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cpp/src/qpid/log/Selector.cpp b/cpp/src/qpid/log/Selector.cpp index 994421d0ff..4d1c5b6e0c 100644 --- a/cpp/src/qpid/log/Selector.cpp +++ b/cpp/src/qpid/log/Selector.cpp @@ -52,12 +52,13 @@ Selector::Selector(const Options& opt){ boost::bind(&Selector::enable, this, _1)); } -bool Selector::isEnabled(Level level, const std::string& function) { +bool Selector::isEnabled(Level level, const char* function) { + const char* functionEnd = function+::strlen(function); for (std::vector<std::string>::iterator i=substrings[level].begin(); i != substrings[level].end(); ++i) { - if (function.find(*i) != std::string::npos) + if (std::search(function, functionEnd, i->begin(), i->end()) != functionEnd) return true; } return false; |
