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
1=== modified file 'dash/ResultViewGrid.cpp'
2--- dash/ResultViewGrid.cpp 2012-12-13 14:26:56 +0000
3+++ dash/ResultViewGrid.cpp 2013-01-09 13:47:27 +0000
4@@ -662,16 +662,15 @@
5 GfxContext.GetRenderStates().GetBlend(current_alpha_blend, current_src_blend_factor, current_dest_blend_factor);
6 GfxContext.GetRenderStates().SetBlend(true, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
7
8- float saturation_progress = 1.0 - desaturation_progress();
9- float saturation = 1.0;
10- float opacity = 1.0;
11-
12 int items_per_row = GetItemsPerRow();
13
14 int row_lower_bound = row_index * items_per_row;
15 if (row_lower_bound >= std::get<0>(visible_bounds) &&
16 row_lower_bound <= std::get<1>(visible_bounds))
17 {
18+ float saturation_progress = 1.0 - desaturation_progress();
19+ float saturation = 1.0;
20+ float opacity = 1.0;
21 int x_position = padding + GetGeometry().x;
22 for (int column_index = 0; column_index < items_per_row; column_index++)
23 {