1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-10 18:10:56 +09:00

Yet another pass of style fixes.

This commit is contained in:
Andreas Kling 2018-12-21 02:10:45 +01:00
parent 89040cdc99
commit ec1c487dcd
Notes: sideshowbarker 2024-07-19 16:07:52 +09:00
43 changed files with 183 additions and 185 deletions

View file

@ -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];
};
}