Changeset 85482 in webkit


Ignore:
Timestamp:
May 2, 2011 9:52:44 AM (13 years ago)
Author:
abarth@webkit.org
Message:

2011-05-02 Adam Barth <abarth@webkit.org>

Reviewed by Alexey Proskuryakov.

StringImpl::endsWith has some insane code
https://bugs.webkit.org/show_bug.cgi?id=59900

  • wtf/text/StringImpl.cpp: (WTF::StringImpl::endsWith):
    • m_data shadows a member variable of the same name.
Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r85467 r85482  
     12011-05-02  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Alexey Proskuryakov.
     4
     5        StringImpl::endsWith has some insane code
     6        https://bugs.webkit.org/show_bug.cgi?id=59900
     7
     8        * wtf/text/StringImpl.cpp:
     9        (WTF::StringImpl::endsWith):
     10            - m_data shadows a member variable of the same name.
     11
    1122011-05-02  Gabor Loki  <loki@webkit.org>
    213
  • trunk/Source/JavaScriptCore/wtf/text/StringImpl.cpp

    r80012 r85482  
    762762}
    763763
    764 bool StringImpl::endsWith(StringImpl* m_data, bool caseSensitive)
    765 {
    766     ASSERT(m_data);
    767     if (m_length >= m_data->m_length) {
    768         unsigned start = m_length - m_data->m_length;
    769         return (caseSensitive ? find(m_data, start) : findIgnoringCase(m_data, start)) == start;
     764bool StringImpl::endsWith(StringImpl* matchString, bool caseSensitive)
     765{
     766    ASSERT(matchString);
     767    if (m_length >= matchString->m_length) {
     768        unsigned start = m_length - matchString->m_length;
     769        return (caseSensitive ? find(matchString, start) : findIgnoringCase(matchString, start)) == start;
    770770    }
    771771    return false;
Note: See TracChangeset for help on using the changeset viewer.