mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-01 21:53:54 +00:00
e575ee4462
There was a small mishmash of argument order, as seen on the table: | Traits<T>::equals(U, T) | Traits<T>::equals(T, U) ============= | ======================= | ======================= uses equals() | HashMap | Vector, HashTable defines equals() | *String[^1] | ByteBuffer [^1]: String, DeprecatedString, their Fly-type equivalents and KString. This mostly meant that you couldn't use a StringView for finding a value in Vector<String>. I'm changing the order of arguments to make the trait type itself first (`Traits<T>::equals(T, U)`), as I think it's more expected and makes us more consistent with the rest of the functions that put the stored type first (like StringUtils functions and binary_serach). I've also renamed the variable name "other" in find functions to "entry" to give more importance to the value. With this change, each of the following lines will now compile successfully: Vector<String>().contains_slow("WHF!"sv); HashTable<String>().contains("WHF!"sv); HashMap<ByteBuffer, int>().contains("WHF!"sv.bytes()); |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
TestAllOf.cpp | ||
TestAnyOf.cpp | ||
TestArbitrarySizedEnum.cpp | ||
TestArray.cpp | ||
TestAtomic.cpp | ||
TestBadge.cpp | ||
TestBase64.cpp | ||
TestBinaryHeap.cpp | ||
TestBinarySearch.cpp | ||
TestBitCast.cpp | ||
TestBitmap.cpp | ||
TestBitStream.cpp | ||
TestBuiltinWrappers.cpp | ||
TestByteBuffer.cpp | ||
TestCharacterTypes.cpp | ||
TestChecked.cpp | ||
TestCircularBuffer.cpp | ||
TestCircularDeque.cpp | ||
TestCircularQueue.cpp | ||
TestComplex.cpp | ||
TestDeprecatedString.cpp | ||
TestDisjointChunks.cpp | ||
TestDistinctNumeric.cpp | ||
TestDoublyLinkedList.cpp | ||
TestDuration.cpp | ||
TestEndian.cpp | ||
TestEnumBits.cpp | ||
TestFind.cpp | ||
TestFixedArray.cpp | ||
TestFixedPoint.cpp | ||
TestFloatingPoint.cpp | ||
TestFloatingPointParsing.cpp | ||
TestFlyString.cpp | ||
TestFormat.cpp | ||
TestGenericLexer.cpp | ||
TestHashFunctions.cpp | ||
TestHashMap.cpp | ||
TestHashTable.cpp | ||
TestHex.cpp | ||
TestIndexSequence.cpp | ||
TestInsertionSort.cpp | ||
TestIntegerMath.cpp | ||
TestIntrusiveList.cpp | ||
TestIntrusiveRedBlackTree.cpp | ||
TestIPv4Address.cpp | ||
TestIPv6Address.cpp | ||
TestJSON.cpp | ||
TestLEB128.cpp | ||
TestLexicalPath.cpp | ||
TestMACAddress.cpp | ||
TestMemory.cpp | ||
TestMemoryStream.cpp | ||
TestNeverDestroyed.cpp | ||
TestNonnullOwnPtr.cpp | ||
TestNonnullRefPtr.cpp | ||
TestNumberFormat.cpp | ||
TestOptional.cpp | ||
TestOwnPtr.cpp | ||
TestPrint.cpp | ||
TestQueue.cpp | ||
TestQuickSelect.cpp | ||
TestQuickSort.cpp | ||
TestRedBlackTree.cpp | ||
TestRefPtr.cpp | ||
TestSIMD.cpp | ||
TestSinglyLinkedList.cpp | ||
TestSourceGenerator.cpp | ||
TestSourceLocation.cpp | ||
TestSpan.cpp | ||
TestStack.cpp | ||
TestStatistics.cpp | ||
TestStdLibExtras.cpp | ||
TestString.cpp | ||
TestStringFloatingPointConversions.cpp | ||
TestStringUtils.cpp | ||
TestStringView.cpp | ||
TestTrie.cpp | ||
TestTuple.cpp | ||
TestTypedTransfer.cpp | ||
TestTypeTraits.cpp | ||
TestUFixedBigInt.cpp | ||
TestURL.cpp | ||
TestUtf8.cpp | ||
TestUtf16.cpp | ||
TestVariant.cpp | ||
TestVector.cpp | ||
TestWeakPtr.cpp |