Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Core: Clean up coding style in the Interpreter #715

Merged
merged 1 commit into from Aug 2, 2014

Conversation

lioncash
Copy link
Member

@lioncash lioncash commented Aug 2, 2014

No description provided.

@@ -129,7 +131,10 @@ void Interpreter::fctiwx(UGeckoInstruction _inst)
{
double t = b + 0.5;
i = (s32)t;
if (t - i < 0 || (t - i == 0 && b > 0)) i--;

if (t - i < 0 || (t - i == 0 && b > 0))

This comment was marked as off-topic.

This comment was marked as off-topic.

@BhaaLseN
Copy link
Member

BhaaLseN commented Aug 2, 2014

Always yay for cleanup, and LGTM, but...
those 3 ifs inside fctwix feel like they should the same style to me (either with brackets, even tho they are one-liners; or without, because they are just one-liners). We don't really have a concrete rule "do it like this", only a "you can if its clear" - but in that case, when looking at a diff, it arises the question on why it uses a mix (and whether something intended is missing, or its just pure coincidence).

void Interpreter::RunTable19(UGeckoInstruction _inst) { m_opTable19[_inst.SUBOP10](_inst); }
void Interpreter::RunTable31(UGeckoInstruction _inst) { m_opTable31[_inst.SUBOP10](_inst); }
void Interpreter::RunTable59(UGeckoInstruction _inst) { m_opTable59[_inst.SUBOP5 ](_inst); }
void Interpreter::RunTable63(UGeckoInstruction _inst) { m_opTable63[_inst.SUBOP10](_inst); }

This comment was marked as off-topic.

@Tilka
Copy link
Member

Tilka commented Aug 2, 2014

lgtm in the sense that I scrolled through and nothing caught my eye.

lioncash added a commit that referenced this pull request Aug 2, 2014
Core: Clean up coding style in the Interpreter
@lioncash lioncash merged commit a723fd3 into dolphin-emu:master Aug 2, 2014
@lioncash lioncash deleted the interp branch August 2, 2014 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants