Skip to content

Commit

Permalink
Fixed warning in 64-bit windows build (#24)
Browse files Browse the repository at this point in the history
* 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)
  • Loading branch information
ludekvodicka authored and pantor committed Mar 9, 2018
1 parent 6da3761 commit f67767a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/inja.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ struct Parsed {
};

using Arguments = std::vector<ElementExpression>;
using CallbackSignature = std::pair<std::string, int>;
using CallbackSignature = std::pair<std::string, size_t>;
};


Expand Down

0 comments on commit f67767a

Please sign in to comment.