Remove unnecessary use of boost::make_optional

Closes #119.
This commit is contained in:
MerryMage 2017-11-28 20:56:49 +00:00
parent d00ce34432
commit 80c56aa89d
6 changed files with 6 additions and 6 deletions

View file

@ -327,7 +327,7 @@ boost::optional<const ArmMatcher<V>&> 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<const ArmMatcher<V>&>(*iter) : boost::none;
return iter != table.end() ? boost::optional<const ArmMatcher<V>&>(*iter) : boost::none;
}
} // namespace Arm

View file

@ -120,7 +120,7 @@ boost::optional<const Thumb16Matcher<V>&> 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<const Thumb16Matcher<V>&>(*iter) : boost::none;
return iter != table.end() ? boost::optional<const Thumb16Matcher<V>&>(*iter) : boost::none;
}
} // namespace Arm

View file

@ -40,7 +40,7 @@ boost::optional<const Thumb32Matcher<V>&> 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<const Thumb32Matcher<V>&>(*iter) : boost::none;
return iter != table.end() ? boost::optional<const Thumb32Matcher<V>&>(*iter) : boost::none;
}
} // namespace Arm

View file

@ -85,7 +85,7 @@ boost::optional<const VFP2Matcher<V>&> 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<const VFP2Matcher<V>&>(*iter) : boost::none;
return iter != table.end() ? boost::optional<const VFP2Matcher<V>&>(*iter) : boost::none;
}
} // namespace Arm