From 7a5eda59146306dedaf3e6f07f97a8c6898543dd Mon Sep 17 00:00:00 2001 From: Frederic L Date: Tue, 30 Oct 2018 05:03:25 +0100 Subject: global: Use std::optional instead of boost::optional (#1578) * get rid of boost::optional * Remove optional references * Use std::reference_wrapper for optional references * Fix clang format * Fix clang format part 2 * Adressed feedback * Fix clang format and MacOS build --- src/video_core/engines/shader_bytecode.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/video_core/engines/shader_bytecode.h') diff --git a/src/video_core/engines/shader_bytecode.h b/src/video_core/engines/shader_bytecode.h index 141b9159b..b84da512f 100644 --- a/src/video_core/engines/shader_bytecode.h +++ b/src/video_core/engines/shader_bytecode.h @@ -5,12 +5,11 @@ #pragma once #include +#include #include #include #include -#include - #include "common/assert.h" #include "common/bit_field.h" #include "common/common_types.h" @@ -1456,7 +1455,7 @@ public: Type type; }; - static boost::optional Decode(Instruction instr) { + static std::optional> Decode(Instruction instr) { static const auto table{GetDecodeTable()}; const auto matches_instruction = [instr](const auto& matcher) { @@ -1464,7 +1463,8 @@ public: }; auto iter = std::find_if(table.begin(), table.end(), matches_instruction); - return iter != table.end() ? boost::optional(*iter) : boost::none; + return iter != table.end() ? std::optional>(*iter) + : std::nullopt; } private: -- cgit v1.2.3