Module: check_mk
Branch: master
Commit: 5bd2e819befcc358b05886a8339fcc6f41f053de
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5bd2e819befcc3…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Tue Mar 6 12:36:45 2018 +0100
Tiny simplifications.
Using braced initializer lists seems to be the more common C++ idiom.
Change-Id: I574bbd9279c600b1cbb19accf7f1c212acaf7b56
---
agents/windows/stringutil.cc | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/agents/windows/stringutil.cc b/agents/windows/stringutil.cc
index cbbeb31..d4b00fd 100644
--- a/agents/windows/stringutil.cc
+++ b/agents/windows/stringutil.cc
@@ -302,10 +302,10 @@ OptionalString matchBase(const std::string &input, const
std::regex ®) {
std::smatch match;
if (std::regex_match(input, match, reg) && match.size() >= 2) {
- return std::optional(match[1].str());
+ return {match[1].str()};
}
- return std::nullopt;
+ return {};
}
OptionalString matchIPv4(const std::string &inputAddr) {
@@ -328,7 +328,7 @@ OptionalString matchIPv6Mapped(const std::string &inputAddr) {
}
}
- return std::nullopt;
+ return {};
}
OptionalString matchIPv6(const std::string &inputAddr) {