From 352166cbe898253cbde1bad7add8903e90b9e6e2 Mon Sep 17 00:00:00 2001 From: Drath Date: Sun, 2 Nov 2025 12:53:48 +0100 Subject: [PATCH] description, also make it 64 bit --- include/utils.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/utils.hpp b/include/utils.hpp index d3478f7..f7d830b 100644 --- a/include/utils.hpp +++ b/include/utils.hpp @@ -7,7 +7,8 @@ #define FILL_CHAR ' ' -#define fastReadNum(path, val) readFile2(path, buf, sizeof(buf)); val = strtol(buf, NULL, 10) +// wrapper around readFile2 func so we can avoid readFile and reuse one buffer, this should be faster and less bug prone? +#define fastReadNum(path, val) readFile2(path, buf, sizeof(buf)); val = strtoll(buf, NULL, 10) // pretty prints num with given decs, 0 by default. its basically a macro so we inline it inline std::string pNum(auto num, uint8_t decs = 0) { return std::format("{:.{}f}", num, decs); }