Merge lp:~mc-return/nux/nux.merge-reduce-the-scope-of-various-variables into lp:nux
| Status: | Merged |
|---|---|
| Approved by: | Brandon Schaefer on 2012-12-05 |
| Approved revision: | 714 |
| Merged at revision: | 730 |
| Proposed branch: | lp:~mc-return/nux/nux.merge-reduce-the-scope-of-various-variables |
| Merge into: | lp:nux |
| Diff against target: |
139 lines (+23/-34) 5 files modified
Nux/HLayout.cpp (+4/-8) Nux/VLayout.cpp (+4/-8) NuxCore/LoggingWriter.cpp (+3/-2) NuxGraphics/IOpenGLBaseTexture.cpp (+7/-9) NuxGraphics/IOpenGLGLSLShader.cpp (+5/-7) |
| To merge this branch: | bzr merge lp:~mc-return/nux/nux.merge-reduce-the-scope-of-various-variables |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Brandon Schaefer (community) | 2012-11-17 | Approve on 2012-12-05 | |
| PS Jenkins bot | continuous-integration | Pending | |
|
Review via email:
|
|||
Commit Message
Reduced the scope of various variables.
| Tim Penhey (thumper) wrote : | # |
On 06/12/12 15:11, <email address hidden> wrote:
> The proposal to merge lp:~mc-return/nux/nux.merge-reduce-the-scope-of-various-variables into lp:nux has been updated.
>
> Status: Approved => Merged
>
> For more details, see:
> https:/
>
I don't suppose you are interested in amending those merges to change
bool foo = (a < b) ? true : false;
to just bee
bool foo = a < b;
?
| Brandon Schaefer (brandontschaefer) wrote : | # |
Geez...I didn't notice how bad that was... Ill push a branch with those changes tomorrow.
| MC Return (mc-return) wrote : | # |
> I don't suppose you are interested in amending those merges to change
>
> bool foo = (a < b) ? true : false;
>
> to just bee
>
> bool foo = a < b;
I did not make such changes.
I just changed the local bools, which where initialized with false, then not used, and after the if statement reassigned a new value, without the old one having been used.
So I removed the initial, unused initialization with false and only declared and initialized them with the correct value later...
| Brandon Schaefer (brandontschaefer) wrote : | # |
@MC
Yes, what Tim wants is to change:
bool larger_width = (pre_geo.width < post_geo.width) ? true : false;
to:
bool larger_width = pre_geo.width < post_geo.width;
... does that make sense how bad that looks?
| MC Return (mc-return) wrote : | # |
@Brandon:
Ah - yes, makes sense.
I am not sure if it looks better, but it produces the same results - so, if that version is faster we should change it, otherwise probably not...

Looks good to me.