diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-12 04:05:21 +0100 |
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-12 04:05:21 +0100 |
| commit | 802c17175e595ddb3075465a1febc432262bcc3f (patch) | |
| tree | 99d5ecabc8d2d62a09ab32976edfb9946ce81fcf /loader | |
| parent | f44e9d51013dbd153df3abc0c7b0ff1485ab65f2 (diff) | |
use Corrade's Optional<T> instead of stl
Diffstat (limited to 'loader')
| -rw-r--r-- | loader/loader-impl.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/loader/loader-impl.cpp b/loader/loader-impl.cpp index 5d97d91c..955ccf03 100644 --- a/loader/loader-impl.cpp +++ b/loader/loader-impl.cpp @@ -9,7 +9,6 @@ #include <unordered_map> #include <utility> #include <memory> -#include <optional> #include <Corrade/Containers/ArrayViewStl.h> #include <Corrade/Containers/Optional.h> #include <Corrade/Containers/Pair.h> @@ -31,7 +30,7 @@ namespace floormat { struct loader_impl final : loader_ { - std::optional<Utility::Resource> shader_res; + Optional<Utility::Resource> shader_res; PluginManager::Manager<Trade::AbstractImporter> importer_plugins; Containers::Pointer<Trade::AbstractImporter> image_importer = importer_plugins.loadAndInstantiate("StbImageImporter"); @@ -60,7 +59,7 @@ struct loader_impl final : loader_ StringView loader_impl::shader(StringView filename) { if (!shader_res) - shader_res = std::make_optional<Utility::Resource>("floormat/shaders"); + shader_res = Optional<Utility::Resource>(InPlaceInit, "floormat/shaders"); auto ret = shader_res->getString(filename); if (ret.isEmpty()) fm_abort("can't find shader resource '%s'", filename.cbegin()); |
