diff --git a/src/super4pcs/io/io_ply.h b/src/super4pcs/io/io_ply.h index 8a0b28f2..4fa51b58 100644 --- a/src/super4pcs/io/io_ply.h +++ b/src/super4pcs/io/io_ply.h @@ -146,13 +146,10 @@ almostsafefread ( void * ptr, size_t size, size_t count, FILE * stream ){ return (result == count); } -template +template inline bool -almostsafefscanf ( FILE * stream, const char * format, ... ){ - va_list args; - va_start(args, format); - int count = fscanf (stream,format, args); - va_end(args); +almostsafefscanf ( FILE * stream, const char * format, Args&&... args ){ + int count = fscanf (stream,format, std::forward(args)...); return (count == targetCount); }