mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 23:20:20 +00:00
AK+Format: Add overloads with const char* for outln, warnln and dbgln.
This makes it possible to forward declare 'warnln' in TestSuite.h.
This commit is contained in:
parent
15c3feb351
commit
afef05ece2
Notes:
sideshowbarker
2024-07-19 01:59:21 +09:00
Author: https://github.com/asynts Commit: https://github.com/SerenityOS/serenity/commit/afef05ece2f Pull-request: https://github.com/SerenityOS/serenity/pull/3705 Reviewed-by: https://github.com/awesomekling
1 changed files with 6 additions and 0 deletions
|
@ -317,6 +317,8 @@ template<typename... Parameters>
|
|||
void new_out(StringView fmtstr, const Parameters&... parameters) { vout(fmtstr, VariadicFormatParams { parameters... }); }
|
||||
template<typename... Parameters>
|
||||
void outln(StringView fmtstr, const Parameters&... parameters) { vout(fmtstr, VariadicFormatParams { parameters... }, true); }
|
||||
template<typename... Parameters>
|
||||
void outln(const char* fmtstr, const Parameters&... parameters) { outln(StringView { fmtstr }, parameters...); }
|
||||
inline void outln() { raw_out("\n"); }
|
||||
|
||||
void vwarn(StringView fmtstr, TypeErasedFormatParams, bool newline = false);
|
||||
|
@ -327,6 +329,8 @@ template<typename... Parameters>
|
|||
void new_warn(StringView fmtstr, const Parameters&... parameters) { vwarn(fmtstr, VariadicFormatParams { parameters... }); }
|
||||
template<typename... Parameters>
|
||||
void warnln(StringView fmtstr, const Parameters&... parameters) { vwarn(fmtstr, VariadicFormatParams { parameters... }, true); }
|
||||
template<typename... Parameters>
|
||||
void warnln(const char* fmtstr, const Parameters&... parameters) { warnln(StringView { fmtstr }, parameters...); }
|
||||
inline void warnln() { raw_out("\n"); }
|
||||
#endif
|
||||
|
||||
|
@ -338,6 +342,8 @@ template<typename... Parameters>
|
|||
void new_dbg(StringView fmtstr, const Parameters&... parameters) { vdbg(fmtstr, VariadicFormatParams { parameters... }); }
|
||||
template<typename... Parameters>
|
||||
void dbgln(StringView fmtstr, const Parameters&... parameters) { vdbg(fmtstr, VariadicFormatParams { parameters... }, true); }
|
||||
template<typename... Parameters>
|
||||
void dbgln(const char* fmtstr, const Parameters&... parameters) { dbgln(StringView { fmtstr }, parameters...); }
|
||||
inline void dbgln() { raw_dbg("\n"); }
|
||||
|
||||
} // namespace AK
|
||||
|
|
Loading…
Reference in a new issue