summaryrefslogtreecommitdiff
path: root/AK/Format.h
diff options
context:
space:
mode:
authorasynts <asynts@gmail.com>2020-10-08 13:26:16 +0200
committerAndreas Kling <kling@serenityos.org>2020-10-09 20:52:17 +0200
commit7ae530fbc78d7593bd959f1869f5b65aed4c76c7 (patch)
tree91fe88681591ee56c9b36b8d0495053c7c5406f2 /AK/Format.h
parentf3b4fbf01fdeef77cb732eb01e8f0944db9984b3 (diff)
downloadserenity-7ae530fbc78d7593bd959f1869f5b65aed4c76c7.zip
AK+Format: Remove new_dbg(dbg) and raw_dbg.
We are adding the process name as prefix and a newline as suffix to any message written to debug. Thus, the following doesn't make any sense: for (u8 byte : bytes) dbg("{:02x} ", byte); dbgln(); Which function call would put the prefix? This doesn't make any sense, thus these functions must go. The example above could be converted to: StringBuilder builder; for (u8 byte : bytes) builder.appendff("{:02x} ", byte); dbgln("{}", builder.build());
Diffstat (limited to 'AK/Format.h')
-rw-r--r--AK/Format.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/AK/Format.h b/AK/Format.h
index 2b800111f1..4bd3a4f4d9 100644
--- a/AK/Format.h
+++ b/AK/Format.h
@@ -332,17 +332,12 @@ void warnln(const char* fmtstr, const Parameters&... parameters) { warnln(String
inline void warnln() { raw_out("\n"); }
#endif
-void vdbg(StringView fmtstr, TypeErasedFormatParams, bool newline = false);
-void raw_dbg(StringView string);
+void vdbgln(StringView fmtstr, TypeErasedFormatParams);
-// FIXME: Rename this function to 'dbg' when that name becomes avaliable.
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); }
+void dbgln(StringView fmtstr, const Parameters&... parameters) { vdbgln(fmtstr, VariadicFormatParams { parameters... }); }
template<typename... Parameters>
void dbgln(const char* fmtstr, const Parameters&... parameters) { dbgln(StringView { fmtstr }, parameters...); }
-inline void dbgln() { raw_dbg("\n"); }
template<typename T, typename = void>
struct HasFormatter : TrueType {
@@ -395,7 +390,5 @@ using AK::warnln;
#endif
using AK::dbgln;
-using AK::new_dbg;
-using AK::raw_dbg;
using AK::FormatIfSupported;