summaryrefslogtreecommitdiff
path: root/src/browser.cpp
diff options
context:
space:
mode:
authorAndrzej Rybczak <electricityispower@gmail.com>2015-05-02 15:01:01 +0200
committerAndrzej Rybczak <electricityispower@gmail.com>2015-05-02 15:01:01 +0200
commitdafcadefafc3829fca5a585026b702b73c2ced1a (patch)
tree211b7907865f8a709a4605a2ba6d423110c55f17 /src/browser.cpp
parent39c331eed61af986e55fbbcf340a946e1af52d52 (diff)
add support for unicode aware regular expressions if available
Diffstat (limited to 'src/browser.cpp')
-rw-r--r--src/browser.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/browser.cpp b/src/browser.cpp
index 0f26862c..82470c93 100644
--- a/src/browser.cpp
+++ b/src/browser.cpp
@@ -68,7 +68,7 @@ void getLocalDirectoryRecursively(std::vector<MPD::Song> &songs, const std::stri
void clearDirectory(const std::string &directory);
std::string itemToString(const MPD::Item &item);
-bool browserEntryMatcher(const boost::regex &rx, const MPD::Item &item, bool filter);
+bool browserEntryMatcher(const Regex::Regex &rx, const MPD::Item &item, bool filter);
}
@@ -287,8 +287,8 @@ bool Browser::allowsSearching()
void Browser::setSearchConstraint(const std::string &constraint)
{
- m_search_predicate = RegexFilter<MPD::Item>(
- boost::regex(constraint, Config.regex_type),
+ m_search_predicate = Regex::Filter<MPD::Item>(
+ Regex::make(constraint, Config.regex_type),
boost::bind(browserEntryMatcher, _1, _2, false)
);
}
@@ -693,11 +693,11 @@ std::string itemToString(const MPD::Item &item)
return result;
}
-bool browserEntryMatcher(const boost::regex &rx, const MPD::Item &item, bool filter)
+bool browserEntryMatcher(const Regex::Regex &rx, const MPD::Item &item, bool filter)
{
if (isItemParentDirectory(item))
return filter;
- return boost::regex_search(itemToString(item), rx);
+ return Regex::search(itemToString(item), rx);
}
}