1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-10-13 15:32:06 +00:00
serenity/AK
Andreas Kling ba3b561a40 AK: Simplify Result class so we can start using it
There were some ideas about how to use this class but we never actually
started using it, so let's just simplify it and get it ready for use.

The basic idea is: a function returns a Result<ValueType, ErrorType>.
Callers check if the result object is_error(). If so, an ErrorType can
be fetched with the error() getter. Otherwise, a ValueType is fetched
with the value() getter. That's it. :^)
2020-04-21 16:19:18 +02:00
..
Tests AK: Add a little test for String::split() 2020-04-14 15:36:25 +02:00
Assertions.h AK: Apply changes for the Bootstrapper environment 2020-02-09 19:38:17 +01:00
Atomic.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
Badge.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
BinarySearch.h Kernel: Optimize VM range deallocation a bit 2020-01-19 13:29:59 +01:00
Bitmap.h Kernel: Support best fit allocation policy in kmalloc() 2020-04-06 08:33:13 +02:00
BufferStream.h LibDebug: Parse line number information from DWARF format 2020-04-20 17:25:50 +02:00
ByteBuffer.h AK: Appending 0 bytes to a ByteBuffer should be a no-op (#1699) 2020-04-08 17:04:37 +02:00
Checked.h AK: Add Checked<T>::multiplication_would_overflow() 2020-04-15 17:14:18 +02:00
CircularDeque.h AK: Add enqueue_begin() for the CircularDeque class (#1320) 2020-03-02 09:50:43 +01:00
CircularQueue.h CircularQueue: Move construct a T object instead of copy constructing it 2020-02-26 15:22:45 +01:00
Demangle.h AK: Reduce header dependency graph of String.h 2020-03-23 13:48:44 +01:00
DoublyLinkedList.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
FileSystemPath.cpp AK: Reduce header dependency graph of String.h 2020-03-23 13:48:44 +01:00
FileSystemPath.h AK: Add a forward declaration header 2020-02-14 23:31:18 +01:00
FixedArray.h Kernel: Use a FixedArray for a process's extra GIDs 2020-02-18 11:35:47 +01:00
FlyString.cpp AK: Make FlyString a little less hilariously unoptimized :^) 2020-04-06 08:26:26 +02:00
FlyString.h AK: Add FlyString::is_empty() 2020-04-16 20:22:54 +02:00
Forward.h AK: Add FlyString, a simple flyweight string class 2020-03-22 13:03:43 +01:00
Function.h Add clang-format file 2019-05-28 17:31:20 +02:00
HashFunctions.h AK: Add global FlatPtr typedef. It's u32 or u64, based on sizeof(void*) 2020-03-08 13:06:51 +01:00
HashMap.h AK: Make HashTable and HashMap use size_t for size and capacity 2020-02-24 09:42:52 +01:00
HashTable.h AK: Expose SinglyLinkedListIterator constructor 2020-02-27 10:21:13 +01:00
IDAllocator.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
InlineLinkedList.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
IntrusiveList.h LibCore: Add a forward declaration header 2020-02-14 23:31:18 +01:00
IPv4Address.h AK: Reduce header dependency graph of String.h 2020-03-23 13:48:44 +01:00
IterationDecision.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
JsonArray.h AK: Simplify JsonObject and JsonArray API a little bit 2020-03-06 08:51:22 +01:00
JsonArraySerializer.h Meta: Claim copyright for files created by me 2020-01-24 15:15:16 +01:00
JsonObject.h AK: Add get_or() method to JsonObject 2020-03-24 22:20:07 +01:00
JsonObjectSerializer.h AK: A few JSON improvements 2020-03-31 13:42:39 +02:00
JsonParser.cpp AK: Break on end of input in JsonParser::consume_quoted_string 2020-04-04 10:31:01 +02:00
JsonParser.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
JsonValue.cpp AK: Add equals method to JsonValue to semantically compare two values. 2020-04-01 22:12:19 +02:00
JsonValue.h AK: Add equals method to JsonValue to semantically compare two values. 2020-04-01 22:12:19 +02:00
kmalloc.h AK: Have AK/kmalloc.h #include <new> on other platforms 2020-02-25 15:58:24 +01:00
kstdio.h AK: Make dbgprintf() and dbgputstr() go to stderr on non-Serenity hosts 2020-04-06 10:49:27 +02:00
LogStream.cpp AK: Add LogStream operator<< overloads for float and double 2020-04-12 19:23:39 +02:00
LogStream.h AK: Add LogStream operator<< overloads for float and double 2020-04-12 19:23:39 +02:00
MACAddress.h Kernel+AK: Separate out MACAddress and move it into AK 2020-04-05 09:50:48 +02:00
Makefile Build: clean up build system, use one shared Makefile 2019-12-20 20:20:54 +01:00
MappedFile.cpp Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
MappedFile.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
Memory.h AK: Move memory stuff (fast memcpy, etc) to a separate header 2020-03-08 13:06:51 +01:00
NetworkOrdered.h AK: Use endianness flags to determine if conversion is necessary 2020-02-19 16:08:28 +01:00
NeverDestroyed.h AK: Fixed a typo in NeverDestroyed.h (#1228) 2020-02-16 09:32:18 +01:00
Noncopyable.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
NonnullOwnPtr.h AK: Stop allowing implicit downcast with OwnPtr and NonnullOwnPtr 2020-04-05 11:32:30 +02:00
NonnullOwnPtrVector.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
NonnullPtrVector.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
NonnullRefPtr.h AK: Stop allowing implicit downcast with RefPtr and NonnullRefPtr 2020-04-05 11:19:00 +02:00
NonnullRefPtrVector.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
NumericLimits.h AK: Add a simple NumericLimits<T> template 2020-04-15 16:58:46 +02:00
Optional.h AK: Inline Optional functions more aggressively 2020-04-12 20:37:51 +02:00
OwnPtr.h AK: Stop allowing implicit downcast with OwnPtr and NonnullOwnPtr 2020-04-05 11:32:30 +02:00
Platform.h AK: Disable the consumable annotation checking to fix Clang build 2020-04-07 17:30:16 +02:00
PrintfImplementation.h AK: Allow %m.nf specifier for double/float in printf to set fraction with 2020-04-07 09:02:02 +02:00
Queue.h AK: Make Queue use size_t for its size 2020-02-25 14:55:04 +01:00
QuickSort.h AK: Dual pivot quicksort implementation (#1838) 2020-04-18 13:58:49 +02:00
RefCounted.h AK: Allow having ref counted pointers to const object 2020-04-20 17:25:50 +02:00
RefPtr.h AK: Stop allowing implicit downcast with RefPtr and NonnullRefPtr 2020-04-05 11:19:00 +02:00
Result.h AK: Simplify Result class so we can start using it 2020-04-21 16:19:18 +02:00
ScopedValueRollback.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
ScopeGuard.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
SharedBuffer.cpp Kernel: Merge the shbuf_get_size() syscall into shbuf_get() 2020-02-28 12:55:58 +01:00
SharedBuffer.h Kernel+LibC: Rename shared buffer syscalls to use a prefix 2020-02-28 12:55:58 +01:00
SinglyLinkedList.h AK: Move memory stuff (fast memcpy, etc) to a separate header 2020-03-08 13:06:51 +01:00
StdLibExtras.h AK: Add MakeUnsigned<T> helper template 2020-04-15 16:58:46 +02:00
String.cpp LibELF: Add find_demangled_function 2020-04-13 23:20:59 +02:00
String.h LibELF: Add find_demangled_function 2020-04-13 23:20:59 +02:00
StringBuilder.cpp AK: Reduce header dependency graph of String.h 2020-03-23 13:48:44 +01:00
StringBuilder.h AK: Add StringBuilder::join() for joining collections with a separator 2020-03-20 14:41:23 +01:00
StringImpl.cpp AK: Add FlyString, a simple flyweight string class 2020-03-22 13:03:43 +01:00
StringImpl.h AK: Let FlyString::hash() assume that the string was already hashed 2020-04-13 12:27:05 +02:00
StringUtils.cpp AK: Add FlyString::equals_ignoring_case(StringView) 2020-03-22 13:07:45 +01:00
StringUtils.h AK: Add FlyString::equals_ignoring_case(StringView) 2020-03-22 13:07:45 +01:00
StringView.cpp AK: Add StringView::contains(char) 2020-04-17 15:22:31 +02:00
StringView.h AK: Add StringView::contains(char) 2020-04-17 15:22:31 +02:00
TemporaryChange.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
TestSuite.h AK: Move the wildcard-matching implementation to StringUtils 2020-03-02 10:38:08 +01:00
Time.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
Traits.h AK: Add HashMap, HashTable and Traits to Forward.h 2020-02-16 02:01:18 +01:00
Types.h Kernel: Add 'ptrace' syscall 2020-03-28 18:27:18 +01:00
URL.cpp AK: Add URL::create_with_url_or_path() 2020-04-19 11:14:26 +02:00
URL.h AK: Add URL::create_with_url_or_path() 2020-04-19 11:14:26 +02:00
Utf8View.cpp AK, LibGfx, LibGUI: Initialize various variables to zero. 2020-02-25 10:18:46 +01:00
Utf8View.h Meta: Claim copyright for files created by me 2020-01-24 15:15:16 +01:00
Vector.h AK: Use __builtin_memset() and such to reduce header dependencies 2020-03-08 13:06:51 +01:00
Weakable.h AK: Make sure that Weakable always has the same memory layout 2020-02-15 14:49:57 +01:00
WeakPtr.h AK: Assert if trying to create a WeakPtr to an object being destroyed 2020-01-25 10:34:32 +01:00