Minor if to else if improvement #4009

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants
Contributor

PulfordJ commented Mar 12, 2013

No description provided.

Contributor

blainesch commented Mar 12, 2013

Since getDriverName() is a method call, would it not be better to cache it before the comparisons? That way it only makes the call once.

@weierophinney weierophinney added a commit that referenced this pull request Mar 12, 2013

@weierophinney weierophinney Merge pull request #4009 from PulfordJ/patch-1
Minor if to else if improvement
1e7e299

@weierophinney weierophinney added a commit that referenced this pull request Mar 12, 2013

@weierophinney weierophinney [#4009] improvement to logic flow
- Pull driver name once to a local variable
- use local variable for comparisons
- move elseif onto same line as closing brace of previous block (per CS)
90d74a3

@weierophinney weierophinney added a commit that referenced this pull request Mar 12, 2013

@weierophinney weierophinney Merge branch 'hotfix/4009' into develop
Forward port #4009
25b16a4
Owner

weierophinney commented Mar 12, 2013

@blainesch I made that exact same observation, and made that change on merge.

@curious-eyes curious-eyes added a commit to curious-eyes/zf2 that referenced this pull request Mar 18, 2013

@weierophinney @curious-eyes weierophinney + curious-eyes [#4009] improvement to logic flow
- Pull driver name once to a local variable
- use local variable for comparisons
- move elseif onto same line as closing brace of previous block (per CS)
c4981b9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment