Changeset 268553 in webkit
- Timestamp:
- Oct 15, 2020 2:15:18 PM (4 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r268552 r268553 1 2020-10-15 Chris Dumez <cdumez@apple.com> 2 3 Use std::fill_n() instead of for loops in AudioParam::calculateFinalValues() 4 https://bugs.webkit.org/show_bug.cgi?id=217766 5 6 Reviewed by Geoffrey Garen. 7 8 Use std::fill_n() instead of for loops in AudioParam::calculateFinalValues(). 9 10 No new tests, no Web-facing behavior change. 11 12 * Modules/webaudio/AudioParam.cpp: 13 (WebCore::AudioParam::calculateFinalValues): 14 1 15 2020-10-15 Wenson Hsieh <wenson_hsieh@apple.com> 2 16 -
trunk/Source/WebCore/Modules/webaudio/AudioParam.cpp
r268414 r268553 267 267 if (timelineValue) 268 268 m_value = *timelineValue; 269 270 for (unsigned i = 0; i < numberOfValues; ++i) 271 values[i] = m_value; 269 std::fill_n(values, numberOfValues, m_value); 272 270 } 273 271 … … 295 293 296 294 // If we're not sample accurate, duplicate the first element of |values| to all of the elements. 297 if (!sampleAccurate) { 298 for (unsigned i = 1; i < numberOfValues; ++i) 299 values[i] = values[0]; 300 } 295 if (!sampleAccurate) 296 std::fill_n(values + 1, numberOfValues - 1, values[0]); 301 297 302 298 // Clamp values based on range allowed by AudioParam's min and max values.
Note: See TracChangeset
for help on using the changeset viewer.