mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:47:44 +00:00
AK: Massage it into building on my host system without breaking Serenity.
This commit is contained in:
parent
b7cca76ca2
commit
255c7562ba
8 changed files with 54 additions and 42 deletions
|
@ -1,17 +1,17 @@
|
|||
#include <AK/PrintfImplementation.h>
|
||||
#include <AK/StdLibExtras.h>
|
||||
#include <AK/StringBuilder.h>
|
||||
#include <LibC/stdarg.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
namespace AK {
|
||||
|
||||
inline void StringBuilder::will_append(ssize_t size)
|
||||
inline void StringBuilder::will_append(int size)
|
||||
{
|
||||
if ((m_length + size) > m_buffer.size())
|
||||
m_buffer.grow(max((ssize_t)16, m_buffer.size() * 2 + size));
|
||||
m_buffer.grow(max((int)16, m_buffer.size() * 2 + size));
|
||||
}
|
||||
|
||||
StringBuilder::StringBuilder(ssize_t initial_capacity)
|
||||
StringBuilder::StringBuilder(int initial_capacity)
|
||||
{
|
||||
m_buffer.grow(initial_capacity);
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ void StringBuilder::append(const StringView& str)
|
|||
m_length += str.length();
|
||||
}
|
||||
|
||||
void StringBuilder::append(const char* characters, ssize_t length)
|
||||
void StringBuilder::append(const char* characters, int length)
|
||||
{
|
||||
if (!length)
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue