mirror of
https://github.com/asdlokj1qpi233/subconverter.git
synced 2026-11-03 02:02:24 +00:00
Add option for choosing between std::regex and pcrecpp
This commit is contained in:
2 files changed
+19
-6
No files matched your search
+9
-2
@@ -7,7 +7,12 @@
|
||||
//#include <filesystem>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef USE_STD_REGEX
|
||||
#include <regex>
|
||||
#else
|
||||
#include <pcrecpp.h>
|
||||
#endif // USE_STD_REGEX
|
||||
|
||||
#include <rapidjson/document.h>
|
||||
#include <openssl/md5.h>
|
||||
|
||||
@@ -447,7 +452,7 @@ std::string replace_all_distinct(std::string str, std::string old_value, std::st
|
||||
return str;
|
||||
}
|
||||
|
||||
/*
|
||||
#ifdef USE_STD_REGEX
|
||||
bool regValid(std::string ®)
|
||||
{
|
||||
try
|
||||
@@ -501,7 +506,8 @@ bool regMatch(std::string src, std::string match)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
#else
|
||||
|
||||
bool regValid(std::string ®)
|
||||
{
|
||||
@@ -560,6 +566,7 @@ bool regMatch(std::string src, std::string match)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#endif // USE_STD_REGEX
|
||||
|
||||
std::string speedCalc(double speed)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user