ladybird/AK
kleines Filmröllchen f502e24bd7 AK: Change the moved-from String state to the empty short string
The previous moved-from state was the null string. This violates both
our invariant that String is never null, and also the C++ contract that
the moved-from state must be valid but unspecified. The empty short
string state is of course valid, so it satisfies both invariants. It
also allows us to remove any extra checks for the null state.

The reason this change is made is primarily because swap() requires
moved-from objects to be reassignable (C++ allows this). Because the
move assignment of String would not check the null state, it crashed
trying to increment the data reference count (nullptr signals a
non-short string). This meant that e.g. quick_sort'ing String would
crash immediately.
2022-12-11 16:05:23 +00:00
..
.clang-tidy Meta: Add basic clang-tidy configuration 2021-11-14 22:52:35 +01:00
AllOf.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
AnyOf.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
ArbitrarySizedEnum.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
Array.h Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00
Assertions.cpp AK: Print VERIFY() error messages in release builds 2022-10-06 15:29:38 +02:00
Assertions.h Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00
Atomic.h Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00
AtomicRefCounted.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
Badge.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
Base64.cpp Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
Base64.h AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
BinaryBufferWriter.h Everywhere: Remove unnecessary AK and Detail namespace scoping 2022-12-09 11:25:30 +00:00
BinaryHeap.h Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00
BinarySearch.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
BitCast.h Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00
Bitmap.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
BitmapView.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
BitStream.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
Buffered.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
BuiltinWrappers.h AK: Implement FloatExtractor<f128> 2022-12-02 16:22:51 +01:00
BumpAllocator.h AK: Take the bump-allocated chunk header into account in destroy_all() 2022-12-06 11:19:50 +01:00
ByteBuffer.h Everywhere: Remove redundant inequality comparison operators 2022-11-06 10:25:08 -07:00
ByteReader.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
CharacterTypes.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
Checked.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
CheckedFormatString.h Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00
CircularDeque.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
CircularDuplexStream.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
CircularQueue.h Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00
CMakeLists.txt AK: Introduce the new String, replacement for DeprecatedString 2022-12-06 15:21:26 +01:00
Complex.h Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00
Concepts.h Everywhere: Remove unnecessary AK and Detail namespace scoping 2022-12-09 11:25:30 +00:00
DateConstants.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
DateTimeLexer.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
Debug.h.in LibVideo: Add PlaybackManager to load and decode videos 2022-10-31 14:47:13 +01:00
Demangle.h Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
DeprecatedString.cpp Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
DeprecatedString.h Everywhere: Use C++ concepts instead of requires clauses 2022-12-09 11:25:30 +00:00
Diagnostics.h AK: Add a helper macro to temporarily ignore diagnostics with _Pragma() 2022-12-06 21:31:00 +00:00
DisjointChunks.h Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00
DistinctNumeric.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
DoublyLinkedList.h Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00
Endian.h AK: Add Byte accessors for BigEndian and LittleEndian 2022-12-10 12:05:55 +00:00
EnumBits.h AK+Kernel: Implement and use EnumBits has_any_flag() 2021-07-16 11:49:50 +02:00
Error.h Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00
ExtraMathConstants.h Userland: Move non-standard math constants from math.h 2021-04-27 23:06:16 +02:00
FileStream.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
Find.h Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00
FixedArray.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
FixedPoint.h Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00
FloatingPoint.h Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00
FloatingPointStringConversions.cpp Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00
FloatingPointStringConversions.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
FlyString.cpp Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
FlyString.h AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
Format.cpp AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
Format.h AK: Add formatters for Span<T> and Span<T const> 2022-12-08 17:14:48 +01:00
Forward.h Everywhere: Remove unnecessary AK and Detail namespace scoping 2022-12-09 11:25:30 +00:00
FPControl.h AK: Add a cpp-y, more fine grained version of fenv.h: FPControl.h 2022-05-07 20:27:05 +02:00
Function.h Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00
FuzzyMatch.cpp AK: Do not require an allocated String for fuzzy matching 2022-09-20 11:08:54 +01:00
FuzzyMatch.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
GenericLexer.cpp Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
GenericLexer.h AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
GenericShorthands.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
HashFunctions.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
HashMap.h AK: Remove HashMap::ensure_capacity 2022-12-10 14:29:46 +01:00
HashTable.h Everywhere: Remove unnecessary AK and Detail namespace scoping 2022-12-09 11:25:30 +00:00
Hex.cpp AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
Hex.h AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
IDAllocator.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
IntegralMath.h AK: Implement FloatExtractor<f128> 2022-12-02 16:22:51 +01:00
IntrusiveDetails.h Kernel: Make self-contained locking smart pointers their own classes 2022-08-20 17:20:43 +02:00
IntrusiveList.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
IntrusiveListRelaxedConst.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
IntrusiveRedBlackTree.h Everywhere: Remove unnecessary AK and Detail namespace scoping 2022-12-09 11:25:30 +00:00
IPv4Address.h Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
IPv6Address.h Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
IterationDecision.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
Iterator.h AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
JsonArray.h Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
JsonArraySerializer.h AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
JsonObject.h Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
JsonObjectSerializer.h AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
JsonParser.cpp Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
JsonParser.h AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
JsonPath.cpp Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
JsonPath.h Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
JsonValue.cpp AK: Disallow implicit pointer-to-boolean conversion in JsonValue 2022-12-09 00:05:30 +01:00
JsonValue.h AK: Disallow implicit pointer-to-boolean conversion in JsonValue 2022-12-09 00:05:30 +01:00
kmalloc.cpp Everywhere: Replace uses of __serenity__ with AK_OS_SERENITY 2022-10-10 12:23:12 +02:00
kmalloc.h AK: Fully qualify some usages of AK features outside of the AK namespace 2022-11-27 23:54:40 +01:00
kstdio.h Everywhere: Replace uses of __serenity__ with AK_OS_SERENITY 2022-10-10 12:23:12 +02:00
LEB128.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
LexicalPath.cpp Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
LexicalPath.h Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
MACAddress.h Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
Math.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
MemMem.h Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00
Memory.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
MemoryStream.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
NeverDestroyed.h Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00
NoAllocationGuard.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
Noncopyable.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
NonnullOwnPtr.h Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00
NonnullOwnPtrVector.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
NonnullPtrVector.h AK: Allow creating NonnullPtrVectors from an initializer list 2022-09-08 18:53:08 +02:00
NonnullRefPtr.h Everywhere: Remove 'clang-format off' comments that are no longer needed 2022-12-03 23:52:23 +00:00
NonnullRefPtrVector.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
NumberFormat.h Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
NumericLimits.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
Optional.h Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00
OwnPtr.h Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00
Platform.h Everywhere: Remove 'clang-format off' comments that are no longer needed 2022-12-03 23:52:23 +00:00
PrintfImplementation.h Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00
Ptr32.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
Queue.h Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00
QuickSort.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
Random.cpp AK: Introduce get_random_uniform() 2021-05-14 22:24:02 +02:00
Random.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
RecursionDecision.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
RedBlackTree.h Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00
RefCounted.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
RefCountForwarder.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
RefPtr.h Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00
Result.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
ReverseIterator.h AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
ScopedValueRollback.h Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00
ScopeGuard.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
ScopeLogger.h Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
SIMD.h AK: Add char SIMD types 2021-07-22 23:33:21 +02:00
SIMDExtras.h LibGfx: Implement PNG filtering on write 2022-07-10 15:01:07 +02:00
SIMDMath.h AK: Add clamp(f32x4, float, float) 2022-05-09 21:49:48 +02:00
Singleton.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
SinglyLinkedList.h Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00
SinglyLinkedListWithCount.h Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00
SourceGenerator.h AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
SourceLocation.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
Span.h Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00
Stack.h Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00
StackInfo.cpp Everywhere: Add support for compilation under emscripten 2022-11-26 02:23:15 +03:30
StackInfo.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
Statistics.h Everywhere: Use C++ concepts instead of requires clauses 2022-12-09 11:25:30 +00:00
StdLibExtraDetails.h Everywhere: Remove unnecessary AK and Detail namespace scoping 2022-12-09 11:25:30 +00:00
StdLibExtras.h Everywhere: Remove unnecessary AK and Detail namespace scoping 2022-12-09 11:25:30 +00:00
Stream.h Everywhere: Remove unnecessary AK and Detail namespace scoping 2022-12-09 11:25:30 +00:00
String.cpp AK: Change the moved-from String state to the empty short string 2022-12-11 16:05:23 +00:00
String.h AK: Add comparison operator 2022-12-11 16:05:23 +00:00
StringBuilder.cpp AK: Introduce the new String, replacement for DeprecatedString 2022-12-06 15:21:26 +01:00
StringBuilder.h Everywhere: Remove unnecessary AK and Detail namespace scoping 2022-12-09 11:25:30 +00:00
StringFloatingPointConversions.cpp Everywhere: Fix a few comment typos 2022-11-09 16:00:32 +00:00
StringFloatingPointConversions.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
StringHash.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
StringImpl.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
StringImpl.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
StringUtils.cpp AK: Introduce the new String, replacement for DeprecatedString 2022-12-06 15:21:26 +01:00
StringUtils.h AK: Introduce the new String, replacement for DeprecatedString 2022-12-06 15:21:26 +01:00
StringView.cpp AK: Add StringView(String const&) constructor 2022-12-07 09:58:38 +00:00
StringView.h AK: Add StringView(String const&) constructor 2022-12-07 09:58:38 +00:00
TemporaryChange.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
Time.cpp Lagom: Win32 support baby steps 2022-09-29 17:01:22 +01:00
Time.h Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00
Traits.h Everywhere: Use C++ concepts instead of requires clauses 2022-12-09 11:25:30 +00:00
Trie.h Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00
Try.h AK: Ignore -Wshadow in TRY() and MUST() 2022-12-06 21:31:00 +00:00
Tuple.h Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00
TypeCasts.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
TypedTransfer.h AK: Use TypedTransfer to move vector's inline buffer 2022-11-17 20:13:04 +03:30
TypeList.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
Types.h AK: Fully qualify some usages of AK features outside of the AK namespace 2022-11-27 23:54:40 +01:00
UBSanitizer.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
UFixedBigInt.h Everywhere: Remove unnecessary AK and Detail namespace scoping 2022-12-09 11:25:30 +00:00
UnicodeUtils.h AK: Remove now-unused AK::UnicodeUtils methods 2022-01-18 15:13:25 +00:00
URL.cpp Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
URL.h Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
URLParser.cpp Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
URLParser.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
Userspace.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
Utf8View.cpp AK: Add Utf8View::iterator_at_byte_offset_without_validation() 2022-11-24 16:06:20 +00:00
Utf8View.h AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
Utf16View.cpp AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
Utf16View.h AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
Utf32View.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
UUID.cpp Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
UUID.h Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
Variant.h Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00
Vector.h AK: Add Vector::shrink_to_fit() 2022-12-08 23:36:17 +00:00
Weakable.h Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00
WeakPtr.h Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00