mirror of
https://github.com/ArashPartow/exprtk.git
synced 2025-08-17 03:47:32 +00:00
Merge e3e1a17ba5
into cf1e3f25a1
This commit is contained in:
@ -17057,12 +17057,8 @@ namespace exprtk
|
|||||||
#define exprtk_define_freefunction(NN) \
|
#define exprtk_define_freefunction(NN) \
|
||||||
inline bool add_function(const std::string& function_name, ff##NN##_functor function) \
|
inline bool add_function(const std::string& function_name, ff##NN##_functor function) \
|
||||||
{ \
|
{ \
|
||||||
if (!valid()) \
|
if (!valid() || !valid_symbol(function_name) || symbol_exists(function_name)) \
|
||||||
return false; \
|
{return false;} \
|
||||||
else if (!valid_symbol(function_name)) \
|
|
||||||
return false; \
|
|
||||||
else if (symbol_exists(function_name)) \
|
|
||||||
return false; \
|
|
||||||
\
|
\
|
||||||
exprtk::ifunction<T>* ifunc = new freefunc##NN(function); \
|
exprtk::ifunction<T>* ifunc = new freefunc##NN(function); \
|
||||||
\
|
\
|
||||||
|
Reference in New Issue
Block a user