Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(442)

Issue 244253002: Avoid useless initialization in ScrollAnimatorNone::PerAxisData::animateScroll() (Closed)

Created:
6 years, 8 months ago by Inactive
Modified:
6 years, 8 months ago
CC:
blink-reviews, shans, rjwright, alancutter (OOO until 2018), Mike Lawther (Google), dstockwell, Timothy Loh, darktears, Steve Block, dino_apple.com, Eric Willigers
Visibility:
Public.

Description

Avoid useless initialization in ScrollAnimatorNone::PerAxisData::animateScroll() Avoid useless initialization in ScrollAnimatorNone::PerAxisData::animateScroll(). The value initially assigned to newPosition was always overwritten. Therefore, the initial assignment can be omitted. This CL moves the initialization code to a new inline function and initializes directly the newPosition variable with the result of this new function. The clang static code analizer was reporting this as a dead initialization. R=abarth@chromium.org, eseidel@chromium.org Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=172001

Patch Set 1 #

Total comments: 2

Patch Set 2 : Move code to a new inline function #

Unified diffs Side-by-side diffs Delta from patch set Stats (+14 lines, -11 lines) Patch
M Source/platform/scroll/ScrollAnimatorNone.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M Source/platform/scroll/ScrollAnimatorNone.cpp View 1 2 chunks +12 lines, -11 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Inactive
6 years, 8 months ago (2014-04-20 02:35:04 UTC) #1
abarth-chromium
https://codereview.chromium.org/244253002/diff/1/Source/platform/scroll/ScrollAnimatorNone.cpp File Source/platform/scroll/ScrollAnimatorNone.cpp (right): https://codereview.chromium.org/244253002/diff/1/Source/platform/scroll/ScrollAnimatorNone.cpp#newcode343 Source/platform/scroll/ScrollAnimatorNone.cpp:343: double newPosition; Can we initialize it to zero? We ...
6 years, 8 months ago (2014-04-20 14:10:05 UTC) #2
Inactive
https://codereview.chromium.org/244253002/diff/1/Source/platform/scroll/ScrollAnimatorNone.cpp File Source/platform/scroll/ScrollAnimatorNone.cpp (right): https://codereview.chromium.org/244253002/diff/1/Source/platform/scroll/ScrollAnimatorNone.cpp#newcode343 Source/platform/scroll/ScrollAnimatorNone.cpp:343: double newPosition; On 2014/04/20 14:10:05, abarth wrote: > Can ...
6 years, 8 months ago (2014-04-20 15:00:55 UTC) #3
abarth-chromium
lgtm Perfect. LGTM
6 years, 8 months ago (2014-04-20 16:41:11 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ch.dumez@samsung.com/244253002/20001
6 years, 8 months ago (2014-04-20 16:41:25 UTC) #5
commit-bot: I haz the power
6 years, 8 months ago (2014-04-20 16:49:56 UTC) #6
Message was sent while issue was closed.
Change committed as 172001

Powered by Google App Engine
This is Rietveld 408576698