aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-01-13 01:25:20 -0800
committerChris Robinson <[email protected]>2023-01-13 01:25:20 -0800
commit974d1b9e6d174f1680604b2872911110f6a0e41c (patch)
tree8dd9517957717b82977e433276a14b9892b3d563 /core
parent97f2c28ddd79474e163f62d666fc8ce555f31e0f (diff)
Avoid unnecessary uses of make_optional
Diffstat (limited to 'core')
-rw-r--r--core/ambdec.cpp2
-rw-r--r--core/cpu_caps.cpp2
-rw-r--r--core/helpers.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/core/ambdec.cpp b/core/ambdec.cpp
index 83c521c0..52a1df05 100644
--- a/core/ambdec.cpp
+++ b/core/ambdec.cpp
@@ -81,7 +81,7 @@ al::optional<std::string> AmbDecConf::load(const char *fname) noexcept
{
al::ifstream f{fname};
if(!f.is_open())
- return al::make_optional(std::string("Failed to open file \"")+fname+"\"");
+ return std::string("Failed to open file \"")+fname+"\"";
ReaderScope scope{ReaderScope::Global};
size_t speaker_pos{0};
diff --git a/core/cpu_caps.cpp b/core/cpu_caps.cpp
index 0325cd49..103d2437 100644
--- a/core/cpu_caps.cpp
+++ b/core/cpu_caps.cpp
@@ -137,5 +137,5 @@ al::optional<CPUInfo> GetCPUInfo()
#endif
#endif
- return al::make_optional(ret);
+ return ret;
}
diff --git a/core/helpers.cpp b/core/helpers.cpp
index 1670561a..99cf009c 100644
--- a/core/helpers.cpp
+++ b/core/helpers.cpp
@@ -51,7 +51,7 @@ const PathNamePair &GetProcBinary()
if(len == 0)
{
ERR("Failed to get process name: error %lu\n", GetLastError());
- procbin = al::make_optional<PathNamePair>();
+ procbin.emplace();
return *procbin;
}