Merge lp:~mc-return/unity/unity.merge-reduce-scope-of-some-variables into lp:unity

Proposed by MC Return
Status: Merged
Approved by: Stephen M. Webb
Approved revision: no longer in the source branch.
Merged at revision: 3030
Proposed branch: lp:~mc-return/unity/unity.merge-reduce-scope-of-some-variables
Merge into: lp:unity
Diff against target: 23 lines (+3/-4)
1 file modified
dash/ResultViewGrid.cpp (+3/-4)
To merge this branch: bzr merge lp:~mc-return/unity/unity.merge-reduce-scope-of-some-variables
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Needs Fixing
Marco Trevisan (Treviño) Approve
Review via email: mp+142516@code.launchpad.net

Commit message

Reduced the scope of the variables saturation, saturation_progress and opacity.

To post a comment you must log in.
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) :
review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'dash/ResultViewGrid.cpp'
--- dash/ResultViewGrid.cpp 2012-12-13 14:26:56 +0000
+++ dash/ResultViewGrid.cpp 2013-01-09 13:47:27 +0000
@@ -662,16 +662,15 @@
662 GfxContext.GetRenderStates().GetBlend(current_alpha_blend, current_src_blend_factor, current_dest_blend_factor);662 GfxContext.GetRenderStates().GetBlend(current_alpha_blend, current_src_blend_factor, current_dest_blend_factor);
663 GfxContext.GetRenderStates().SetBlend(true, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);663 GfxContext.GetRenderStates().SetBlend(true, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
664664
665 float saturation_progress = 1.0 - desaturation_progress();
666 float saturation = 1.0;
667 float opacity = 1.0;
668
669 int items_per_row = GetItemsPerRow();665 int items_per_row = GetItemsPerRow();
670666
671 int row_lower_bound = row_index * items_per_row;667 int row_lower_bound = row_index * items_per_row;
672 if (row_lower_bound >= std::get<0>(visible_bounds) &&668 if (row_lower_bound >= std::get<0>(visible_bounds) &&
673 row_lower_bound <= std::get<1>(visible_bounds))669 row_lower_bound <= std::get<1>(visible_bounds))
674 {670 {
671 float saturation_progress = 1.0 - desaturation_progress();
672 float saturation = 1.0;
673 float opacity = 1.0;
675 int x_position = padding + GetGeometry().x;674 int x_position = padding + GetGeometry().x;
676 for (int column_index = 0; column_index < items_per_row; column_index++)675 for (int column_index = 0; column_index < items_per_row; column_index++)
677 {676 {