Split 'IsRAMAddress' method into 'IsEffectiveRAMAddress' and 'IsPhysicalRAMAddress' methods
Simple refactor to remove a bool argument. The PR also simplifies the branching returns.
Failed lint check
Failed lint check
I can't see what is wrong.
Click the ❌ next to the commit, find lint, then click details to see the build log. You may have to click on "view all ### lines" if the log is long.
Alternatively, you can try running Tools/lint.sh locally. It requires a specific clang-format version, though.
You can also just use the autoformatter if using Visual Studio
Please squash the commits into one.
@dolphin-emu-bot rebuild
The only thing I might suggest is moving the definition for MMU::IsPhysicalRAMAddress before the definition for MMU::IsEffectiveRAMAddress in MMU.cpp (also reorder the declarations in MMU.h for consistency). When compiling from top to bottom, if the compiler knows the definition for a function it is calling, then it may decide to inline it if that would be more optimal than calling it. Whether or not this example would result in inlining is another story, but it's a good coding habit I usually try to follow.
Oh, and auto translate_address in MMU::IsEffectiveRAMAddress can be made const. It's a shame MMU::IsEffectiveRAMAddress itself isn't a const member function, but fixing that is a little out of scope for this PR / I haven't fully explored if there's a deeply hidden reason why it isn't.
@JosJuice Anything to add?
@jordan-woyak Merge?
@jordan-woyak Reminder
Can you put Core/PowerPC: in the commit message, please?