1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 03:57:44 +00:00

LibC: Always inline the printf character helpers

This commit is contained in:
Andreas Kling 2020-02-19 22:09:44 +01:00
parent 151467b569
commit 4a66de580e

View file

@ -390,13 +390,13 @@ int dbgprintf(const char* fmt, ...)
return ret;
}
static void stdout_putch(char*&, char ch)
[[gnu::always_inline]] inline void stdout_putch(char*&, char ch)
{
putchar(ch);
}
static FILE* __current_stream = nullptr;
static void stream_putch(char*&, char ch)
[[gnu::always_inline]] inline static void stream_putch(char*&, char ch)
{
fputc(ch, __current_stream);
}
@ -452,7 +452,7 @@ int sprintf(char* buffer, const char* fmt, ...)
}
static size_t __vsnprintf_space_remaining;
static void sized_buffer_putch(char*& bufptr, char ch)
[[gnu::always_inline]] inline void sized_buffer_putch(char*& bufptr, char ch)
{
if (__vsnprintf_space_remaining) {
*bufptr++ = ch;