diff options
| author | Amlal <amlal@nekernel.org> | 2025-04-27 23:31:27 +0200 |
|---|---|---|
| committer | Amlal <amlal@nekernel.org> | 2025-04-27 23:31:27 +0200 |
| commit | 8a7396493c3effb356d2dc4484b993b4698bc422 (patch) | |
| tree | 1726a7342eaf1ae3adaefbfe019e20cff9b9ab09 /dev/kernel/NewKit/KString.h | |
| parent | 11dd858e1d9da71a182bc707ca3a481dafbccbe4 (diff) | |
dev, kernel: HeFS had to be redesigned to be less problematic with hard-drives.
why?
the struct were way too big to fit wihin a sector.
Signed-off-by: Amlal <amlal@nekernel.org>
Diffstat (limited to 'dev/kernel/NewKit/KString.h')
| -rw-r--r-- | dev/kernel/NewKit/KString.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/dev/kernel/NewKit/KString.h b/dev/kernel/NewKit/KString.h index 133fe945..a9a58b7e 100644 --- a/dev/kernel/NewKit/KString.h +++ b/dev/kernel/NewKit/KString.h @@ -12,14 +12,14 @@ #include <NewKit/KernelPanic.h> #include <NewKit/Utils.h> -#define cMinimumStringSize 8196 +#define kMinimumStringSize (8196U) namespace Kernel { /// @brief Kernel string class, not dynamic. class KString final { public: explicit KString() { - fDataSz = cMinimumStringSize; + fDataSz = kMinimumStringSize; fData = new Char[fDataSz]; MUST_PASS(fData); @@ -70,12 +70,13 @@ class KString final { friend class KStringBuilder; }; -struct KStringBuilder final { +class KStringBuilder final { +public: static ErrorOr<KString> Construct(const Char* data); static const Char* FromBool(const Char* fmt, bool n); static const Char* Format(const Char* fmt, const Char* from); static bool Equals(const Char* lhs, const Char* rhs); - static bool Equals(const Utf16Char* lhs, const Utf16Char* rhs); + static bool Equals(const Utf8Char* lhs, const Utf8Char* rhs); static bool Equals(const WideChar* lhs, const WideChar* rhs); }; } // namespace Kernel |
