diff --git a/src/backend_x64/emit_x64.cpp b/src/backend_x64/emit_x64.cpp index f982afb8..223b2df4 100644 --- a/src/backend_x64/emit_x64.cpp +++ b/src/backend_x64/emit_x64.cpp @@ -124,7 +124,7 @@ boost::optional EmitX64::GetBasicBlock(IR::LocationDes auto iter = block_descriptors.find(descriptor.UniqueHash()); if (iter == block_descriptors.end()) return boost::none; - return boost::make_optional(iter->second); + return iter->second; } void EmitX64::EmitVoid(RegAlloc&, IR::Block&, IR::Inst*) { diff --git a/src/backend_x64/reg_alloc.cpp b/src/backend_x64/reg_alloc.cpp index 75906d14..22446c2f 100644 --- a/src/backend_x64/reg_alloc.cpp +++ b/src/backend_x64/reg_alloc.cpp @@ -388,7 +388,7 @@ HostLoc RegAlloc::SelectARegister(HostLocList desired_locations) const { boost::optional RegAlloc::ValueLocation(const IR::Inst* value) const { for (size_t i = 0; i < HostLocCount; i++) if (hostloc_info[i].ContainsValue(value)) - return boost::make_optional(static_cast(i)); + return static_cast(i); return boost::none; } diff --git a/src/frontend/decoder/arm.h b/src/frontend/decoder/arm.h index 95949c76..cc9ce8bc 100644 --- a/src/frontend/decoder/arm.h +++ b/src/frontend/decoder/arm.h @@ -327,7 +327,7 @@ boost::optional&> DecodeArm(u32 instruction) { const auto matches_instruction = [instruction](const auto& matcher) { return matcher.Matches(instruction); }; auto iter = std::find_if(table.begin(), table.end(), matches_instruction); - return iter != table.end() ? boost::make_optional&>(*iter) : boost::none; + return iter != table.end() ? boost::optional&>(*iter) : boost::none; } } // namespace Arm diff --git a/src/frontend/decoder/thumb16.h b/src/frontend/decoder/thumb16.h index a057ee97..4a745ffb 100644 --- a/src/frontend/decoder/thumb16.h +++ b/src/frontend/decoder/thumb16.h @@ -120,7 +120,7 @@ boost::optional&> DecodeThumb16(u16 instruction) { const auto matches_instruction = [instruction](const auto& matcher){ return matcher.Matches(instruction); }; auto iter = std::find_if(table.begin(), table.end(), matches_instruction); - return iter != table.end() ? boost::make_optional&>(*iter) : boost::none; + return iter != table.end() ? boost::optional&>(*iter) : boost::none; } } // namespace Arm diff --git a/src/frontend/decoder/thumb32.h b/src/frontend/decoder/thumb32.h index 9653b238..23e99c85 100644 --- a/src/frontend/decoder/thumb32.h +++ b/src/frontend/decoder/thumb32.h @@ -40,7 +40,7 @@ boost::optional&> DecodeThumb32(u32 instruction) { const auto matches_instruction = [instruction](const auto& matcher){ return matcher.Matches(instruction); }; auto iter = std::find_if(table.begin(), table.end(), matches_instruction); - return iter != table.end() ? boost::make_optional&>(*iter) : boost::none; + return iter != table.end() ? boost::optional&>(*iter) : boost::none; } } // namespace Arm diff --git a/src/frontend/decoder/vfp2.h b/src/frontend/decoder/vfp2.h index 485ef876..d09d9dd4 100644 --- a/src/frontend/decoder/vfp2.h +++ b/src/frontend/decoder/vfp2.h @@ -85,7 +85,7 @@ boost::optional&> DecodeVFP2(u32 instruction) { const auto matches_instruction = [instruction](const auto& matcher){ return matcher.Matches(instruction); }; auto iter = std::find_if(table.begin(), table.end(), matches_instruction); - return iter != table.end() ? boost::make_optional&>(*iter) : boost::none; + return iter != table.end() ? boost::optional&>(*iter) : boost::none; } } // namespace Arm