result: update for accurate ::Includes

This commit is contained in:
Michael Scire 2020-11-30 17:16:00 -08:00
parent 14d50c0e39
commit f63d79d8f9

View File

@ -171,8 +171,8 @@ namespace ams {
static constexpr typename ResultTraits::BaseType StartValue = ResultTraits::MakeStaticValue<Module, DescriptionStart>::value; static constexpr typename ResultTraits::BaseType StartValue = ResultTraits::MakeStaticValue<Module, DescriptionStart>::value;
static constexpr typename ResultTraits::BaseType EndValue = ResultTraits::MakeStaticValue<Module, DescriptionEnd>::value; static constexpr typename ResultTraits::BaseType EndValue = ResultTraits::MakeStaticValue<Module, DescriptionEnd>::value;
public: public:
NX_CONSTEXPR bool Includes(Result result) { static constexpr bool Includes(Result result) {
return StartValue <= result.GetValue() && result.GetValue() <= EndValue; return result.GetModule() == Module && DescriptionStart <= result.GetDescription() && result.GetDescription() <= DescriptionEnd;
} }
}; };