fix windows
Some checks are pending
ContinuousIntegration / macos (push) Waiting to run
ContinuousIntegration / windows (push) Waiting to run
ContinuousIntegration / linux (push) Successful in 24s

This commit is contained in:
Green Sky 2024-06-10 21:48:59 +02:00
parent c882c90780
commit 0e358157f2
No known key found for this signature in database

View File

@ -3,10 +3,14 @@
#include <regex>
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 ]+)\\] (.+)$"};
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;
}