Changeset 268558 in webkit


Ignore:
Timestamp:
Oct 15, 2020 3:24:27 PM (4 years ago)
Author:
Chris Dumez
Message:

Use std::fill_n() instead of for loops in ConstantSourceNode
https://bugs.webkit.org/show_bug.cgi?id=217777

Reviewed by Eric Carlson.

Use std::fill_n() instead of for loops in ConstantSourceNode.

No new tests, no Web-facing behavior change.

  • Modules/webaudio/ConstantSourceNode.cpp:

(WebCore::ConstantSourceNode::process):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r268557 r268558  
     12020-10-15  Chris Dumez  <cdumez@apple.com>
     2
     3        Use std::fill_n() instead of for loops in ConstantSourceNode
     4        https://bugs.webkit.org/show_bug.cgi?id=217777
     5
     6        Reviewed by Eric Carlson.
     7
     8        Use std::fill_n() instead of for loops in ConstantSourceNode.
     9
     10        No new tests, no Web-facing behavior change.
     11
     12        * Modules/webaudio/ConstantSourceNode.cpp:
     13        (WebCore::ConstantSourceNode::process):
     14
    1152020-10-15  Chris Dumez  <cdumez@apple.com>
    216
  • trunk/Source/WebCore/Modules/webaudio/ConstantSourceNode.cpp

    r267639 r268558  
    9999    else {
    100100        float* dest = outputBus.channel(0)->mutableData();
    101         dest += quantumFrameOffset;
    102         for (unsigned i = 0; i < nonSilentFramesToProcess; ++i)
    103             dest[i] = value;
     101        std::fill_n(dest + quantumFrameOffset, nonSilentFramesToProcess, value);
    104102        outputBus.clearSilentFlag();
    105103    }
Note: See TracChangeset for help on using the changeset viewer.