fix windows
This commit is contained in:
parent
c882c90780
commit
0e358157f2
@ -3,10 +3,14 @@
|
|||||||
#include <regex>
|
#include <regex>
|
||||||
|
|
||||||
std::optional<LPLRes> log_parse_line(std::string_view line) {
|
std::optional<LPLRes> log_parse_line(std::string_view line) {
|
||||||
|
if (line.empty()) {
|
||||||
|
return std::nullopt;
|
||||||
|
}
|
||||||
|
|
||||||
static const std::regex mod_match{".*Factorio-Event-Logger+.*\\[([A-Z ]+)\\] (.+)$"};
|
static const std::regex mod_match{".*Factorio-Event-Logger+.*\\[([A-Z ]+)\\] (.+)$"};
|
||||||
|
|
||||||
std::cmatch matches;
|
std::cmatch matches;
|
||||||
if (!std::regex_match(line.cbegin(), line.cend(), matches, mod_match)) {
|
if (!std::regex_match(line.data(), line.data() + line.size(), matches, mod_match)) {
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user