summaryrefslogtreecommitdiff
path: root/asl/format.hpp
diff options
context:
space:
mode:
authorSteven Le Rouzic <steven.lerouzic@gmail.com>2024-11-04 22:34:24 +0100
committerSteven Le Rouzic <steven.lerouzic@gmail.com>2024-12-20 15:35:58 +0100
commitd0a08e9883907847342505c8c5cf459fb84b4aa5 (patch)
tree6641d67daa98672fdb9713589b7520c2a7085c98 /asl/format.hpp
parentd729d8dc9966fe4af04cf1661649e57888bb41b2 (diff)
Use span in format
Diffstat (limited to 'asl/format.hpp')
-rw-r--r--asl/format.hpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/asl/format.hpp b/asl/format.hpp
index 386a39c..aad9d65 100644
--- a/asl/format.hpp
+++ b/asl/format.hpp
@@ -3,6 +3,7 @@
#include "asl/integers.hpp"
#include "asl/meta.hpp"
#include "asl/io.hpp"
+#include "asl/span.hpp"
namespace asl
{
@@ -37,7 +38,7 @@ struct type_erased_arg
};
// @Todo Use span
-void format(writer*, const char* fmt, const type_erased_arg* args, int64_t arg_count);
+void format(writer*, const char* fmt, span<const type_erased_arg> args);
} // namespace internals
@@ -67,11 +68,11 @@ void format(writer* w, const char* fmt, const Args&... args)
format_internals::type_erased_arg(args)...
};
- format_internals::format(w, fmt, type_erased_args, types_count<Args...>);
+ format_internals::format(w, fmt, type_erased_args);
}
else
{
- format_internals::format(w, fmt, nullptr, 0);
+ format_internals::format(w, fmt, {});
}
}