Skip to content
  • andersca@apple.com's avatar
    Remove Complex.h from WTF · 63de3c96
    andersca@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=115989
    
    Reviewed by Beth Dakin.
    
    Source/WebCore:
    
    Replace Complex declarations with std::complex<double>. Pass by value since the struct
    is small enough to go into two registers on X86-64.
    
    * Modules/webaudio/RealtimeAnalyser.cpp:
    (WebCore::RealtimeAnalyser::doFFTAnalysis):
    (WebCore::RealtimeAnalyser::getFloatFrequencyData):
    (WebCore::RealtimeAnalyser::getByteFrequencyData):
    (WebCore::RealtimeAnalyser::getByteTimeDomainData):
    * platform/audio/Biquad.cpp:
    (WebCore::Biquad::setZeroPolePairs):
    (WebCore::Biquad::setAllpassPole):
    (WebCore::Biquad::getFrequencyResponse):
    * platform/audio/Biquad.h:
    * platform/audio/FFTFrame.cpp:
    (WebCore::FFTFrame::interpolateFrequencyComponents):
    (WebCore::FFTFrame::extractAverageGroupDelay):
    (WebCore::FFTFrame::addConstantGroupDelay):
    
    Source/WTF:
    
    Complex.h contains a typedef and a single function (that already has an equivalent in the STL).
    The header is used by three files in WebCore, so just use std::complex<double> and std::polar directly.
    
    * GNUmakefile.list.am:
    * WTF.vcproj/WTF.vcproj:
    * WTF.vcxproj/WTF.vcxproj:
    * WTF.vcxproj/WTF.vcxproj.filters:
    * WTF.xcodeproj/project.pbxproj:
    * wtf/CMakeLists.txt:
    * wtf/Complex.h: Removed.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149970 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    63de3c96