From f67767a6b231d82cfe00db0609c6fa33850fd225 Mon Sep 17 00:00:00 2001 From: Ludek Vodicka Date: Fri, 9 Mar 2018 14:43:56 +0100 Subject: [PATCH] Fixed warning in 64-bit windows build (#24) * Fixed passing callback arguments as reference * Another passing as const reference instead of new instance * Implemented variable number of parameters - extended function "function_regex" to pass minimum and maximum parameters. if minimum=maximum, all params are required, if minimum = 0, all params are optional..... - for single parameter there is different regex (created by the same function_regex function) to allo read sort([1,2,3]) as one parameter - extended Match to test if group is valid, so only valid params are filled to params vector - new function arguments_count to test number of arguments passed to callback * unit tests for updated callbacks with variable number of params * merge with last version * Optimized passing arguments as const reference * Fixed warning on 64-bit windows (conversion from 'size_t' to 'int', possible loss of data) --- src/inja.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/inja.hpp b/src/inja.hpp index a45e54df..c98ded88 100644 --- a/src/inja.hpp +++ b/src/inja.hpp @@ -347,7 +347,7 @@ struct Parsed { }; using Arguments = std::vector; - using CallbackSignature = std::pair; + using CallbackSignature = std::pair; };