From 2c87aa33dfde23920d1dccd04c472c8884118b90 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 4 Jun 2024 18:01:10 +0100 Subject: Replace messy uasprintf with std::format --- test/testHelpers.cpp | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 test/testHelpers.cpp (limited to 'test/testHelpers.cpp') diff --git a/test/testHelpers.cpp b/test/testHelpers.cpp deleted file mode 100644 index c69e5f3..0000000 --- a/test/testHelpers.cpp +++ /dev/null @@ -1,16 +0,0 @@ -#include "testHelpers.h" -#include - -std::unique_ptr -uasprintf(const char * fmt, ...) -{ - char * buf {}; - va_list args; - va_start(args, fmt); - if (vasprintf(&buf, fmt, args) < 0) { - va_end(args); - return {nullptr, &free}; - } - va_end(args); - return std::unique_ptr {buf, &free}; -} -- cgit v1.2.3