diff options
author | Andrzej Rybczak <electricityispower@gmail.com> | 2013-09-14 18:06:54 +0200 |
---|---|---|
committer | Andrzej Rybczak <electricityispower@gmail.com> | 2013-09-14 18:06:54 +0200 |
commit | a494bb72d4e9abc536a79d1baa33150f42eb0b69 (patch) | |
tree | 2113e20880ff63185f92b8acbac272926d058a8e /src | |
parent | 88790185ee03b0f2740eb10f603d7fb719d86097 (diff) |
search engine: fix regex searching
Diffstat (limited to 'src')
-rw-r--r-- | src/search_engine.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/search_engine.cpp b/src/search_engine.cpp index 57895c01..c4e382dc 100644 --- a/src/search_engine.cpp +++ b/src/search_engine.cpp @@ -460,16 +460,16 @@ void SearchEngine::Search() { rx.assign(itsConstraints[0], Config.regex_type); any_found = - boost::regex_search(it->getArtist(), rx) - || boost::regex_search(it->getAlbumArtist(), rx) - || boost::regex_search(it->getTitle(), rx) - || boost::regex_search(it->getAlbum(), rx) - || boost::regex_search(it->getName(), rx) - || boost::regex_search(it->getComposer(), rx) - || boost::regex_search(it->getPerformer(), rx) - || boost::regex_search(it->getGenre(), rx) - || boost::regex_search(it->getDate(), rx) - || boost::regex_search(it->getComment(), rx); + boost::regex_search(it->getArtist(), rx) + || boost::regex_search(it->getAlbumArtist(), rx) + || boost::regex_search(it->getTitle(), rx) + || boost::regex_search(it->getAlbum(), rx) + || boost::regex_search(it->getName(), rx) + || boost::regex_search(it->getComposer(), rx) + || boost::regex_search(it->getPerformer(), rx) + || boost::regex_search(it->getGenre(), rx) + || boost::regex_search(it->getDate(), rx) + || boost::regex_search(it->getComment(), rx); } catch (boost::bad_expression &) { } } @@ -569,16 +569,16 @@ void SearchEngine::Search() { if (!itsConstraints[0].empty()) any_found = - !cmp(it->getArtist(), itsConstraints[0]) - || !cmp(it->getAlbumArtist(), itsConstraints[0]) - || !cmp(it->getTitle(), itsConstraints[0]) - || !cmp(it->getAlbum(), itsConstraints[0]) - || !cmp(it->getName(), itsConstraints[0]) - || !cmp(it->getComposer(), itsConstraints[0]) - || !cmp(it->getPerformer(), itsConstraints[0]) - || !cmp(it->getGenre(), itsConstraints[0]) - || !cmp(it->getDate(), itsConstraints[0]) - || !cmp(it->getComment(), itsConstraints[0]); + !cmp(it->getArtist(), itsConstraints[0]) + || !cmp(it->getAlbumArtist(), itsConstraints[0]) + || !cmp(it->getTitle(), itsConstraints[0]) + || !cmp(it->getAlbum(), itsConstraints[0]) + || !cmp(it->getName(), itsConstraints[0]) + || !cmp(it->getComposer(), itsConstraints[0]) + || !cmp(it->getPerformer(), itsConstraints[0]) + || !cmp(it->getGenre(), itsConstraints[0]) + || !cmp(it->getDate(), itsConstraints[0]) + || !cmp(it->getComment(), itsConstraints[0]); if (found && !itsConstraints[1].empty()) found = !cmp(it->getArtist(), itsConstraints[1]); |