diff options
| author | Rodrigo Locatti <reinuseslisp@airmail.cc> | 2020-09-22 23:37:51 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-22 23:37:51 +0000 |
| commit | 2b863c9aa34e388f6c64665a2e7d8c808d598c26 (patch) | |
| tree | 288ff1cc4677d6511ed8cc7e1b0db20ce2d2590f /src/core/hle/service/nvflinger | |
| parent | c07fd2898b45032b5e4084fc49a19018ad099ba6 (diff) | |
| parent | ff45c3957858cdf189b73e11550da06fe4337b8e (diff) | |
Merge pull request #4698 from lioncash/optional-null
General: Make use of std::nullopt where applicable
Diffstat (limited to 'src/core/hle/service/nvflinger')
| -rw-r--r-- | src/core/hle/service/nvflinger/nvflinger.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/hle/service/nvflinger/nvflinger.cpp b/src/core/hle/service/nvflinger/nvflinger.cpp index f644a460d..c64673dba 100644 --- a/src/core/hle/service/nvflinger/nvflinger.cpp +++ b/src/core/hle/service/nvflinger/nvflinger.cpp @@ -114,7 +114,7 @@ std::optional<u64> NVFlinger::OpenDisplay(std::string_view name) { [&](const VI::Display& display) { return display.GetName() == name; }); if (itr == displays.end()) { - return {}; + return std::nullopt; } return itr->GetID(); @@ -124,7 +124,7 @@ std::optional<u64> NVFlinger::CreateLayer(u64 display_id) { auto* const display = FindDisplay(display_id); if (display == nullptr) { - return {}; + return std::nullopt; } const u64 layer_id = next_layer_id++; @@ -144,7 +144,7 @@ std::optional<u32> NVFlinger::FindBufferQueueId(u64 display_id, u64 layer_id) co const auto* const layer = FindLayer(display_id, layer_id); if (layer == nullptr) { - return {}; + return std::nullopt; } return layer->GetBufferQueue().GetId(); |
