Skip to content

Commit

Permalink
remove uneeded make_optional
Browse files Browse the repository at this point in the history
  • Loading branch information
aronwk-aaron committed Jan 3, 2025
1 parent fd1ce75 commit 2ce2f4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dCommon/GeneralUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 2ce2f4e

Please sign in to comment.