|
Use clampTo instead of chaining std::max(std::min(...))
It's common to make a value end up between two other values by using
std::min and std::max but we have a clampTo function that will
make the code much easier to read so we should use it.
The performance is the same (both end up doing inline comparisons and
value selection) but not having to include <algorithm> can bring a
very slight compilation speed boost.
BUG= 563433
Committed: https://crrev.com/881b6566ecacfe9154e1f115c588e76cec8a513a
Cr-Commit-Position: refs/heads/master@{#366585}
Total comments: 6
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+68 lines, -56 lines) |
Patch |
 |
M |
third_party/WebKit/Source/platform/audio/AudioDelayDSPKernel.cpp
|
View
|
1
2
3
|
3 chunks |
+3 lines, -5 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/audio/AudioResamplerKernel.cpp
|
View
|
1
2
3
|
2 chunks |
+2 lines, -3 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/audio/Biquad.cpp
|
View
|
1
2
3
|
8 chunks |
+8 lines, -7 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/audio/DynamicsCompressorKernel.cpp
|
View
|
1
2
3
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/audio/EqualPowerPanner.cpp
|
View
|
1
2
3
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/audio/HRTFDatabase.cpp
|
View
|
1
2
3
|
2 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/audio/HRTFKernel.cpp
|
View
|
1
2
3
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/audio/HRTFPanner.cpp
|
View
|
1
2
3
|
2 chunks |
+1 line, -3 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/audio/VectorMath.cpp
|
View
|
1
2
3
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/graphics/Color.cpp
|
View
|
1
2
3
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
|
View
|
1
2
3
|
2 chunks |
+4 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/graphics/filters/FEComponentTransfer.cpp
|
View
|
1
2
3
|
5 chunks |
+6 lines, -4 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/graphics/filters/FELighting.cpp
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/graphics/filters/FESpecularLighting.cpp
|
View
|
1
2
3
|
2 chunks |
+3 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/graphics/filters/SpotLightSource.h
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/graphics/filters/SpotLightSource.cpp
|
View
|
1
2
3
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.mm
|
View
|
1
2
3
|
3 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/scroll/ScrollAnimatorBase.cpp
|
View
|
1
2
3
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/scroll/ScrollableArea.h
|
View
|
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/scroll/ScrollbarThemeOverlay.cpp
|
View
|
1
2
3
|
2 chunks |
+3 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/speech/PlatformSpeechSynthesisUtterance.h
|
View
|
|
2 chunks |
+4 lines, -3 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/transforms/TransformationMatrix.cpp
|
View
|
1
2
3
|
3 chunks |
+5 lines, -3 lines |
0 comments
|
Download
|
Total messages: 21 (7 generated)
|