mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-19 13:03:36 +00:00
[core] Regex refactoring
Signed-off-by: x7z4w <x7z4w@noreply.codeberg.org>
This commit is contained in:
@@ -17,10 +17,11 @@
|
||||
#include <algorithm>
|
||||
#include <cctype>
|
||||
#include <memory>
|
||||
#include <regex>
|
||||
#include <sstream>
|
||||
#include <unordered_set>
|
||||
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
#include "defines.hpp"
|
||||
|
||||
namespace platform
|
||||
@@ -42,8 +43,8 @@ bool IsSpecialName(string const & name) { return name == "." || name == ".."; }
|
||||
*/
|
||||
bool IsDownloaderFile(string const & name)
|
||||
{
|
||||
static std::regex const filter(".*\\.(downloading|resume|ready)[0-9]?$");
|
||||
return std::regex_match(name.begin(), name.end(), filter);
|
||||
static boost::regex const filter(".*\\.(downloading|resume|ready)[0-9]?$");
|
||||
return boost::regex_match(name.begin(), name.end(), filter);
|
||||
}
|
||||
|
||||
bool IsDiffFile(string const & name)
|
||||
|
||||
Reference in New Issue
Block a user