mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
Yet another pass of style fixes.
This commit is contained in:
@@ -10,14 +10,14 @@ enum ShouldChomp { NoChomp, Chomp };
|
||||
|
||||
class StringImpl : public Retainable<StringImpl> {
|
||||
public:
|
||||
static RetainPtr<StringImpl> createUninitialized(size_t length, char*& buffer);
|
||||
static RetainPtr<StringImpl> create_uninitialized(size_t length, char*& buffer);
|
||||
static RetainPtr<StringImpl> create(const char* cstring, ShouldChomp = NoChomp);
|
||||
static RetainPtr<StringImpl> create(const char* cstring, size_t length, ShouldChomp = NoChomp);
|
||||
RetainPtr<StringImpl> toLowercase() const;
|
||||
RetainPtr<StringImpl> toUppercase() const;
|
||||
RetainPtr<StringImpl> to_lowercase() const;
|
||||
RetainPtr<StringImpl> to_uppercase() const;
|
||||
|
||||
static StringImpl& theEmptyStringImpl();
|
||||
static void initializeGlobals();
|
||||
static StringImpl& the_empty_stringimpl();
|
||||
static void initialize_globals();
|
||||
|
||||
~StringImpl();
|
||||
|
||||
@@ -28,7 +28,7 @@ public:
|
||||
unsigned hash() const
|
||||
{
|
||||
if (!m_hasHash)
|
||||
computeHash();
|
||||
compute_hash();
|
||||
return m_hash;
|
||||
}
|
||||
|
||||
@@ -37,15 +37,15 @@ private:
|
||||
explicit StringImpl(ConstructTheEmptyStringImplTag) : m_characters("") { }
|
||||
|
||||
enum ConstructWithInlineBufferTag { ConstructWithInlineBuffer };
|
||||
explicit StringImpl(ConstructWithInlineBufferTag, size_t length) : m_length(length), m_characters(m_inlineBuffer) { }
|
||||
explicit StringImpl(ConstructWithInlineBufferTag, size_t length) : m_length(length), m_characters(m_inline_buffer) { }
|
||||
|
||||
void computeHash() const;
|
||||
void compute_hash() const;
|
||||
|
||||
size_t m_length { 0 };
|
||||
mutable bool m_hasHash { false };
|
||||
const char* m_characters { nullptr };
|
||||
mutable unsigned m_hash { 0 };
|
||||
char m_inlineBuffer[0];
|
||||
char m_inline_buffer[0];
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user