diff options
author | Andreas Kling <kling@serenityos.org> | 2021-01-12 19:21:59 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-01-12 23:34:01 +0100 |
commit | 1a08ac72ad4610689f23ae76f41bd8adcb23fe47 (patch) | |
tree | 844395bad7a402d864512296360c9c2ef0083712 /AK/PrintfImplementation.h | |
parent | d551263b111bc83e65fa845ef245f43982dfd7ad (diff) | |
download | serenity-1a08ac72ad4610689f23ae76f41bd8adcb23fe47.zip |
LibC+Everywhere: Remove open_with_path_length() in favor of open()
This API was a mostly gratuitous deviation from POSIX that gave up some
portability in exchange for avoiding the occasional strlen().
I don't think that was actually achieving anything valuable, so let's
just chill out and have the same open() API as everyone else. :^)
Diffstat (limited to 'AK/PrintfImplementation.h')
-rw-r--r-- | AK/PrintfImplementation.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/AK/PrintfImplementation.h b/AK/PrintfImplementation.h index 0fd229bd1f..df22925735 100644 --- a/AK/PrintfImplementation.h +++ b/AK/PrintfImplementation.h @@ -33,17 +33,17 @@ #include <AK/Types.h> #include <stdarg.h> -namespace PrintfImplementation { - -static constexpr const char* printf_hex_digits_lower = "0123456789abcdef"; -static constexpr const char* printf_hex_digits_upper = "0123456789ABCDEF"; - #ifdef __serenity__ extern "C" size_t strlen(const char*); #else # include <string.h> #endif +namespace PrintfImplementation { + +static constexpr const char* printf_hex_digits_lower = "0123456789abcdef"; +static constexpr const char* printf_hex_digits_upper = "0123456789ABCDEF"; + template<typename PutChFunc, typename T> ALWAYS_INLINE int print_hex(PutChFunc putch, char*& bufptr, T number, bool upper_case, bool alternate_form, bool left_pad, bool zero_pad, u8 field_width) { |