diff --git a/rpcs3/Emu/CPU/CPUTranslator.cpp b/rpcs3/Emu/CPU/CPUTranslator.cpp index 550c9b6cd3..8d0e088628 100644 --- a/rpcs3/Emu/CPU/CPUTranslator.cpp +++ b/rpcs3/Emu/CPU/CPUTranslator.cpp @@ -40,7 +40,7 @@ void cpu_translator::initialize(llvm::LLVMContext& context, llvm::ExecutionEngin cpu == "bdver2" || cpu == "bdver3" || cpu == "bdver4" || - cpu.substr(0, 5) == "znver") + cpu.startswith("znver")) { m_use_fma = true; } diff --git a/rpcs3/Emu/Cell/Modules/cellSail.cpp b/rpcs3/Emu/Cell/Modules/cellSail.cpp index 52a1472ca9..62cac29200 100644 --- a/rpcs3/Emu/Cell/Modules/cellSail.cpp +++ b/rpcs3/Emu/Cell/Modules/cellSail.cpp @@ -802,7 +802,7 @@ s32 cellSailPlayerCreateDescriptor(vm::ptr pSelf, s32 streamType case CELL_SAIL_STREAM_PAMF: { std::string uri = pUri.get_ptr(); - if (uri.substr(0, 12) == "x-cell-fs://") + if (uri.starts_with("x-cell-fs://")) { if (fs::file f{ vfs::get(uri.substr(12)) }) { diff --git a/rpcs3/Emu/RSX/GL/GLVertexProgram.cpp b/rpcs3/Emu/RSX/GL/GLVertexProgram.cpp index eaddc162f5..12fa212e0a 100644 --- a/rpcs3/Emu/RSX/GL/GLVertexProgram.cpp +++ b/rpcs3/Emu/RSX/GL/GLVertexProgram.cpp @@ -166,7 +166,7 @@ void GLVertexDecompilerThread::insertMainStart(std::stringstream & OS) { for (const ParamItem &PI : PT.items) { - if (PI.name.substr(0, 7) == "dst_reg") + if (PI.name.starts_with("dst_reg")) continue; OS << " " << PT.type << " " << PI.name; diff --git a/rpcs3/Emu/RSX/VK/VKVertexProgram.cpp b/rpcs3/Emu/RSX/VK/VKVertexProgram.cpp index db4482e679..76a688d432 100644 --- a/rpcs3/Emu/RSX/VK/VKVertexProgram.cpp +++ b/rpcs3/Emu/RSX/VK/VKVertexProgram.cpp @@ -226,7 +226,7 @@ void VKVertexDecompilerThread::insertMainStart(std::stringstream & OS) { for (const ParamItem &PI : PT.items) { - if (PI.name.substr(0, 7) == "dst_reg") + if (PI.name.starts_with("dst_reg")) continue; OS << " " << PT.type << " " << PI.name;