mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
CodeViewWidget: Get rid of magic values in OnInsertBLR() and OnInsertNOP()
A call like ReplaceAddress(address, 0) is pretty ambiguous; so is ReplaceAddress(address, false), so use an enum class that tells people straight-up what the replacer is. This also gets rid of the really weird naming, where if 'blr' is true, we'd be replacing the address with a NOP, rather than an actual BLR instruction, so we invert that so it actually makes sense. There's no actual bug fixed here though, considering the OnInsert functions specified the correct values; it's literally just weird naming.
This commit is contained in:
@ -40,7 +40,13 @@ signals:
|
||||
void BreakpointsChanged();
|
||||
|
||||
private:
|
||||
void ReplaceAddress(u32 address, bool blr);
|
||||
enum class ReplaceWith
|
||||
{
|
||||
BLR,
|
||||
NOP
|
||||
};
|
||||
|
||||
void ReplaceAddress(u32 address, ReplaceWith replace);
|
||||
|
||||
void resizeEvent(QResizeEvent*) override;
|
||||
void keyPressEvent(QKeyEvent* event) override;
|
||||
|
Reference in New Issue
Block a user