diff options
author | Chris Robinson <[email protected]> | 2023-01-13 01:25:20 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2023-01-13 01:25:20 -0800 |
commit | 974d1b9e6d174f1680604b2872911110f6a0e41c (patch) | |
tree | 8dd9517957717b82977e433276a14b9892b3d563 /common | |
parent | 97f2c28ddd79474e163f62d666fc8ce555f31e0f (diff) |
Avoid unnecessary uses of make_optional
Diffstat (limited to 'common')
-rw-r--r-- | common/strutils.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/strutils.cpp b/common/strutils.cpp index 18c4947a..d0418eff 100644 --- a/common/strutils.cpp +++ b/common/strutils.cpp @@ -47,7 +47,7 @@ al::optional<std::string> getenv(const char *envname) { const char *str{std::getenv(envname)}; if(str && str[0] != '\0') - return al::make_optional<std::string>(str); + return str; return al::nullopt; } @@ -56,7 +56,7 @@ al::optional<std::wstring> getenv(const WCHAR *envname) { const WCHAR *str{_wgetenv(envname)}; if(str && str[0] != L'\0') - return al::make_optional<std::wstring>(str); + return str; return al::nullopt; } #endif |