From c8ad84e0460e0fc8efe8a98b169118590c8fd662 Mon Sep 17 00:00:00 2001 From: Nicolas Date: Tue, 22 Aug 2017 12:37:11 +0200 Subject: [PATCH] Fix bug introduced in 93e9fbf on variadic parameters forwarding. --- src/super4pcs/io/io_ply.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) 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); }