Bananymous
0e714d5eb4
BAN: Implement String::operator==(const String&)
2023-12-24 13:36:46 +02:00
Bananymous
d5e0900cbb
BAN: String now uses union for its sso storage
...
This allows String to shrink by 8 bytes since Variant's 8 index is
no longer stored in here.
This required me to make Strings max size one bit less, but that
should still be fine. There should never be strings with size of
over half of the computer's address space.
2023-10-30 11:13:16 +02:00
Bananymous
229082a1b2
BAN: Rewrite String with small string optimizations
...
String now holds a 15 byte sso buffer. I'm not sure what the size
should actually be but 15 will work for now. Maybe the sso buffer
should be contained in an union with one bit flag in size instead of
variant that uses extra 8 bytes for type index.
This patch buffs sizeof(String) from 24 bytes to 32 bytes on 64 bit.
I assume this is much better version than the old which had to make
allocation even for empty strings :D.
2023-10-29 03:11:13 +03:00
Bananymous
4c5176f751
BuildSystem: We are now using cmake instead of plain make
...
I have been annoyed for a while since I had to build everything
when running the os since the buildsystem was really bad.
I wanted to rewrite the whole build system and changed to using cmake
:)
2023-04-02 04:07:27 +03:00
Bananymous
10e0c90fde
BAN: String add front() and back() helpers
2023-03-29 14:10:29 +03:00
Bananymous
8edabaea55
BAN: Add iterators to all containers with contiguous memory
2023-03-20 13:26:42 +02:00
Bananymous
1292be71b2
BAN: Add FNV hash for strings
2023-03-16 15:11:22 +02:00
Bananymous
371dfe8ef3
BAN: Formatter now uses perfect forwarding on its arguments
2023-03-08 21:31:26 +02:00
Bananymous
4afc4660a4
BAN: Basic containers have shrink_to_fit() method
...
I also chaged the default memory allocation increase from 1.5 to 2
2023-02-22 02:07:05 +02:00
Bananymous
247f03c79e
BAN: Make ErrorOr<> have attribute [[nodiscard]]
...
We don't have to specify it everytime we make function return ErrorOr
2023-02-19 20:10:30 +02:00
Bananymous
9b8de5025a
All: rename every function from UpperCamelCase to snake_case
...
This was a mess since I didn't know which to use but now I decided
to go with snake_case :)
2023-02-01 21:05:44 +02:00
Bananymous
cf63552b2a
BAN: Cleanup includes
2023-01-17 11:38:16 +02:00
Bananymous
a7a55cd0fb
BAN: Rename Forward.h -> ForwardList.h to avoid confusion with BAN::Forward()
2023-01-17 11:21:21 +02:00
Bananymous
53d1d12c12
BAN: String add operator=(StringView)
2023-01-13 00:57:47 +02:00
Bananymous
61bd9da8e0
BAN: Add [[nodiscard]] to BAN functions returning ErrorOr
2023-01-12 23:57:07 +02:00
Bananymous
f0fd62c703
BAN: Strings can now be constructed using BAN::Formatter
2022-12-27 20:01:05 +02:00
Bananymous
fd4fdffd46
BAN::Formatter now takes putc like function as a parameter
...
This allows us to use capturing lambdas as a putc like function
2022-12-27 19:55:07 +02:00
Bananymous
5345b6b8c3
BAN: overloaded operator== for more types
2022-12-13 20:55:09 +02:00
Bananymous
cb6dee9d91
BAN: Implement more basic functionality
...
String has more features
StringView was implemented
Basic move semantics are now working
Added file for forward declarations
2022-12-13 20:41:32 +02:00
Bananymous
941238830e
BAN: Now actually build libban :D
2022-12-13 16:13:38 +02:00
Bananymous
57b5e7ecf3
BAN: Add pragma once to String and Vector
2022-12-13 15:15:36 +02:00
Bananymous
b491007eac
BAN: Default constructed string is now nullterminated
2022-12-13 15:07:35 +02:00
Bananymous
00f230fcb2
BAN: Add basic String implementation
2022-12-13 14:37:10 +02:00