⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 181558 in webkit


Ignore:
Timestamp:
Mar 16, 2015, 9:32:27 AM (11 years ago)
Author:
benjamin@webkit.org
Message:

Fix StringView after r181525
Unreviewed.

Fix 2 silly mistakes I made in r181525.

  • wtf/text/StringView.cpp:

(WTF::StringView::startsWith):
(WTF::StringView::startsWithIgnoringASCIICase):
(WTF::StringView::endsWith):
(WTF::StringView::endsWithIgnoringASCIICase):
The implementation was inside the #ifdef.

  • wtf/text/StringView.h:

The symbols were not exported.

Location:
trunk/Source/WTF
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r181553 r181558  
     12015-03-16  Benjamin Poulain  <benjamin@webkit.org>
     2
     3        Fix StringView after r181525
     4        Unreviewed.
     5
     6        Fix 2 silly mistakes I made in r181525.
     7
     8        * wtf/text/StringView.cpp:
     9        (WTF::StringView::startsWith):
     10        (WTF::StringView::startsWithIgnoringASCIICase):
     11        (WTF::StringView::endsWith):
     12        (WTF::StringView::endsWithIgnoringASCIICase):
     13        The implementation was inside the #ifdef.
     14
     15        * wtf/text/StringView.h:
     16        The symbols were not exported.
     17
    1182015-03-16  Max Stepin  <maxstepin@gmail.com>
    219
  • trunk/Source/WTF/wtf/text/StringView.cpp

    r181525 r181558  
    3232#include <wtf/NeverDestroyed.h>
    3333
     34namespace WTF {
     35
     36bool StringView::startsWith(const StringView& prefix) const
     37{
     38    return ::WTF::startsWith(*this, prefix);
     39}
     40
     41bool StringView::startsWithIgnoringASCIICase(const StringView& prefix) const
     42{
     43    return ::WTF::endsWithIgnoringASCIICase(*this, prefix);
     44}
     45
     46bool StringView::endsWith(const StringView& prefix) const
     47{
     48    return ::WTF::startsWith(*this, prefix);
     49}
     50
     51bool StringView::endsWithIgnoringASCIICase(const StringView& prefix) const
     52{
     53    return ::WTF::endsWithIgnoringASCIICase(*this, prefix);
     54}
     55
    3456#if CHECK_STRINGVIEW_LIFETIME
    35 
    36 namespace WTF {
    3757
    3858// Manage reference count manually so UnderlyingString does not need to be defined in the header.
     
    119139}
    120140
    121 bool StringView::startsWith(const StringView& prefix) const
    122 {
    123     return ::WTF::startsWith(*this, prefix);
    124 }
     141#endif // CHECK_STRINGVIEW_LIFETIME
    125142
    126 bool StringView::startsWithIgnoringASCIICase(const StringView& prefix) const
    127 {
    128     return ::WTF::endsWithIgnoringASCIICase(*this, prefix);
    129 }
    130 
    131 bool StringView::endsWith(const StringView& prefix) const
    132 {
    133     return ::WTF::startsWith(*this, prefix);
    134 }
    135 
    136 bool StringView::endsWithIgnoringASCIICase(const StringView& prefix) const
    137 {
    138     return ::WTF::endsWithIgnoringASCIICase(*this, prefix);
    139 }
    140 
    141 }
    142 
    143 #endif
     143} // namespace WTF
  • trunk/Source/WTF/wtf/text/StringView.h

    r181525 r181558  
    107107    bool contains(UChar) const;
    108108
    109     bool startsWith(const StringView&) const;
    110     bool startsWithIgnoringASCIICase(const StringView&) const;
    111 
    112     bool endsWith(const StringView&) const;
    113     bool endsWithIgnoringASCIICase(const StringView&) const;
     109    WTF_EXPORT_STRING_API bool startsWith(const StringView&) const;
     110    WTF_EXPORT_STRING_API bool startsWithIgnoringASCIICase(const StringView&) const;
     111
     112    WTF_EXPORT_STRING_API bool endsWith(const StringView&) const;
     113    WTF_EXPORT_STRING_API bool endsWithIgnoringASCIICase(const StringView&) const;
    114114
    115115    int toInt(bool& isValid) const;
Note: See TracChangeset for help on using the changeset viewer.