mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-01-21 12:17:01 +00:00
remove uneeded make_optional
This commit is contained in:
parent
fd1ce75380
commit
2ce2f4e363
@ -271,7 +271,7 @@ namespace GeneralUtils {
|
||||
template <typename T>
|
||||
[[nodiscard]] std::optional<json> TryParse(const std::string_view str) {
|
||||
try {
|
||||
return std::make_optional<json>(json::parse(str));
|
||||
return json::parse(str);
|
||||
} catch (const std::exception& e) {
|
||||
return std::nullopt;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user