mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
9a2523bcc3
StringBeginsWith (resp. StringEndsWith) takes a defaulted nsStringComparator object for doing comparisons. The flexibility this affords is great, but the cost is not: nsStringComparator has virtual methods, so initializing that defaulted object (at every callsite) requires a temporary object whose vtable must be initialized. Since the overwhemingly common case is to use the default comparator anyway, we should not use defaulted arguments and instead provide the default comparator/user-provided comparator cases as separate overloads. This change eliminates the virtual call for the majority of callsites and reduces codesize as well. |
||
---|---|---|
.. | ||
crashtests | ||
moz.build | ||
nsAString.h | ||
nsCharTraits.h | ||
nsDependentString.cpp | ||
nsDependentString.h | ||
nsDependentSubstring.cpp | ||
nsDependentSubstring.h | ||
nsEmbedString.h | ||
nsLiteralString.h | ||
nsPrintfCString.h | ||
nsPromiseFlatString.cpp | ||
nsPromiseFlatString.h | ||
nsReadableUtils.cpp | ||
nsReadableUtils.h | ||
nsString.cpp | ||
nsString.h | ||
nsStringBuffer.h | ||
nsStringComparator.cpp | ||
nsStringFwd.h | ||
nsStringIterator.h | ||
nsStringObsolete.cpp | ||
nsSubstring.cpp | ||
nsSubstring.h | ||
nsSubstringTuple.cpp | ||
nsSubstringTuple.h | ||
nsTDependentString.cpp | ||
nsTDependentString.h | ||
nsTDependentSubstring.cpp | ||
nsTDependentSubstring.h | ||
nsTLiteralString.h | ||
nsTPromiseFlatString.cpp | ||
nsTPromiseFlatString.h | ||
nsTString.cpp | ||
nsTString.h | ||
nsTStringComparator.cpp | ||
nsTStringObsolete.cpp | ||
nsTSubstring.cpp | ||
nsTSubstring.h | ||
nsTSubstringTuple.cpp | ||
nsTSubstringTuple.h | ||
nsUTF8Utils.h | ||
nsUTF8UtilsSSE2.cpp | ||
nsXPCOMStrings.h | ||
nsXPIDLString.h | ||
README.html | ||
string-template-def-char.h | ||
string-template-def-unichar.h | ||
string-template-undef.h |
<html> <!-- This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> <body> <h1><span class="LXRSHORTDESC">managing sequences of characters</span></h1> <p> <span class="LXRLONGDESC"></span> </p> </body> </html>