diff options
author | asynts <asynts@gmail.com> | 2020-11-09 10:47:19 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-11-09 16:21:29 +0100 |
commit | 3b3edbc4d207758e4451568341be07ae53d80418 (patch) | |
tree | 3d71c4bb5b6750bf27d9eb9559daf7a17e5a5d2a /AK | |
parent | 74438e6fdc9d7e4278eb702f87fc703b8a576071 (diff) | |
download | serenity-3b3edbc4d207758e4451568341be07ae53d80418.zip |
AK: Rename new_out to out and new_warn to warn.
Diffstat (limited to 'AK')
-rw-r--r-- | AK/Format.h | 13 | ||||
-rw-r--r-- | AK/Tests/TestFormat.cpp | 2 |
2 files changed, 6 insertions, 9 deletions
diff --git a/AK/Format.h b/AK/Format.h index c3334ca110..0cf7f61dd8 100644 --- a/AK/Format.h +++ b/AK/Format.h @@ -309,27 +309,24 @@ void vformat(const LogStream& stream, StringView fmtstr, TypeErasedFormatParams) #ifndef KERNEL void vout(FILE*, StringView fmtstr, TypeErasedFormatParams, bool newline = false); -// FIXME: Rename 'new_out' to 'out' when the name becomes avaliable. template<typename... Parameters> -void new_out(FILE* file, StringView fmtstr, const Parameters&... parameters) { vout(file, fmtstr, VariadicFormatParams { parameters... }); } +void out(FILE* file, StringView fmtstr, const Parameters&... parameters) { vout(file, fmtstr, VariadicFormatParams { parameters... }); } template<typename... Parameters> void outln(FILE* file, StringView fmtstr, const Parameters&... parameters) { vout(file, fmtstr, VariadicFormatParams { parameters... }, true); } template<typename... Parameters> void outln(FILE* file, const char* fmtstr, const Parameters&... parameters) { vout(file, fmtstr, VariadicFormatParams { parameters... }, true); } inline void outln(FILE* file) { fputc('\n', file); } -// FIXME: Rename 'new_out' to 'out' when the name becomes avaliable. template<typename... Parameters> -void new_out(StringView fmtstr, const Parameters&... parameters) { new_out(stdout, fmtstr, parameters...); } +void out(StringView fmtstr, const Parameters&... parameters) { out(stdout, fmtstr, parameters...); } template<typename... Parameters> void outln(StringView fmtstr, const Parameters&... parameters) { outln(stdout, fmtstr, parameters...); } template<typename... Parameters> void outln(const char* fmtstr, const Parameters&... parameters) { outln(stdout, fmtstr, parameters...); } inline void outln() { outln(stdout); } -// FIXME: Rename 'new_warn' to 'warn' when the name becomes avaliable. template<typename... Parameters> -void new_warn(StringView fmtstr, const Parameters&... parameters) { new_out(stderr, fmtstr, parameters...); } +void warn(StringView fmtstr, const Parameters&... parameters) { out(stderr, fmtstr, parameters...); } template<typename... Parameters> void warnln(StringView fmtstr, const Parameters&... parameters) { outln(stderr, fmtstr, parameters...); } template<typename... Parameters> @@ -385,10 +382,10 @@ struct Formatter<FormatIfSupported<T>> : __FormatIfSupported<T, HasFormatter<T>: } // namespace AK #ifndef KERNEL -using AK::new_out; +using AK::out; using AK::outln; -using AK::new_warn; +using AK::warn; using AK::warnln; #endif diff --git a/AK/Tests/TestFormat.cpp b/AK/Tests/TestFormat.cpp index 4f3f9924f3..d31858e9ec 100644 --- a/AK/Tests/TestFormat.cpp +++ b/AK/Tests/TestFormat.cpp @@ -222,7 +222,7 @@ TEST_CASE(file_descriptor) FILE* file = fdopen(fd, "w+"); outln(file, "{}", "Hello, World!"); - new_out(file, "foo"); + out(file, "foo"); outln(file, "bar"); rewind(file); |