From 44b6c39c9013c5a688b429798f9c1ec329c98fce Mon Sep 17 00:00:00 2001 From: Angelos Mantzaflaris Date: Thu, 7 Dec 2017 23:48:28 +0100 Subject: [PATCH 1/3] shorten if statement and add brackets --- exprtk.hpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/exprtk.hpp b/exprtk.hpp index 56ce801..fcfdd2e 100644 --- a/exprtk.hpp +++ b/exprtk.hpp @@ -1,5 +1,5 @@ /* - ****************************************************************** +g ****************************************************************** * C++ Mathematical Expression Toolkit Library * * * * Author: Arash Partow (1999-2017) * @@ -17057,12 +17057,8 @@ namespace exprtk #define exprtk_define_freefunction(NN) \ inline bool add_function(const std::string& function_name, ff##NN##_functor function) \ { \ - if (!valid()) \ - return false; \ - else if (!valid_symbol(function_name)) \ - return false; \ - else if (symbol_exists(function_name)) \ - return false; \ + if (!valid() || !valid_symbol(function_name) || symbol_exists(function_name)) \ + {return false;} \ \ exprtk::ifunction* ifunc = new freefunc##NN(function); \ \ From 66a214650bfb018e692259f0d40ce32c2bbc959a Mon Sep 17 00:00:00 2001 From: Angelos Mantzaflaris Date: Thu, 7 Dec 2017 23:53:13 +0100 Subject: [PATCH 2/3] shorten if statement and add brackets --- exprtk.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exprtk.hpp b/exprtk.hpp index fcfdd2e..3535ca0 100644 --- a/exprtk.hpp +++ b/exprtk.hpp @@ -1,5 +1,5 @@ /* -g ****************************************************************** + ****************************************************************** * C++ Mathematical Expression Toolkit Library * * * * Author: Arash Partow (1999-2017) * From e3e1a17ba528abdf4390eb284eda975aaf21aa17 Mon Sep 17 00:00:00 2001 From: Angelos Mantzaflaris Date: Thu, 7 Dec 2017 23:55:28 +0100 Subject: [PATCH 3/3] shorten if statement and add brackets --- exprtk.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exprtk.hpp b/exprtk.hpp index 3535ca0..88f96e3 100644 --- a/exprtk.hpp +++ b/exprtk.hpp @@ -17058,7 +17058,7 @@ namespace exprtk inline bool add_function(const std::string& function_name, ff##NN##_functor function) \ { \ if (!valid() || !valid_symbol(function_name) || symbol_exists(function_name)) \ - {return false;} \ + {return false;} \ \ exprtk::ifunction* ifunc = new freefunc##NN(function); \ \