Replace std::string::npos with umax

This commit is contained in:
Nekotekina 2020-03-05 14:05:23 +03:00
parent 0a41999818
commit 7a8772dafa
18 changed files with 42 additions and 42 deletions

View file

@ -421,17 +421,17 @@ void FragmentProgramDecompiler::AddCodeCond(const std::string& lhs, const std::s
bool src_is_fp16 = false;
if ((opflags & (OPFLAGS::texture_ref | OPFLAGS::src_cast_f32)) == 0 &&
rhs.find("$0") != std::string::npos)
rhs.find("$0") != umax)
{
// Texture sample operations are full-width and are exempt
src_is_fp16 = (src0.fp16 && src0.reg_type == RSX_FP_REGISTER_TYPE_TEMP);
if (src_is_fp16 && rhs.find("$1") != std::string::npos)
if (src_is_fp16 && rhs.find("$1") != umax)
{
// References operand 1
src_is_fp16 = (src1.fp16 && src1.reg_type == RSX_FP_REGISTER_TYPE_TEMP);
if (src_is_fp16 && rhs.find("$2") != std::string::npos)
if (src_is_fp16 && rhs.find("$2") != umax)
{
// References operand 2
src_is_fp16 = (src2.fp16 && src2.reg_type == RSX_FP_REGISTER_TYPE_TEMP);