diff --git a/tests/tinytiffreader_test/tinytiffreader_test.cpp b/tests/tinytiffreader_test/tinytiffreader_test.cpp index 75fc077..d5e4831 100644 --- a/tests/tinytiffreader_test/tinytiffreader_test.cpp +++ b/tests/tinytiffreader_test/tinytiffreader_test.cpp @@ -65,12 +65,10 @@ return d; }; - std::string format(const std::string& templ, ...){ - va_list ap; +template + std::string format(const std::string& templ, const T& val){ char buffer[4096]; - va_start (ap, templ); - vsprintf (buffer, templ.c_str(), ap); - va_end (ap); + sprintf(buffer, templ.c_str(), val); std::string ret(buffer); return ret; };