From 56af6c897f83471b762c04a1eacb91f197902927 Mon Sep 17 00:00:00 2001 From: andrey Date: Fri, 2 Apr 2021 12:04:39 +0300 Subject: [PATCH] remove removeVariable --- libs/main/math/pievaluator.cpp | 6 ------ libs/main/math/pievaluator.h | 5 ----- 2 files changed, 11 deletions(-) diff --git a/libs/main/math/pievaluator.cpp b/libs/main/math/pievaluator.cpp index 92445c6c..de265470 100644 --- a/libs/main/math/pievaluator.cpp +++ b/libs/main/math/pievaluator.cpp @@ -241,12 +241,6 @@ PIEvaluatorTypes::Variable PIEvaluatorContent::customVariable(int index) { } -void PIEvaluatorContent::removeVariable(int index) { - if (index < 0 || index >= variables.size_s()) return; - variables.remove(index); -} - - void PIEvaluatorContent::clearCustomVariables() { variables.clear(); addVariable(PIStringAscii("i" ), complexd_i); diff --git a/libs/main/math/pievaluator.h b/libs/main/math/pievaluator.h index 596fc507..bad7ab48 100644 --- a/libs/main/math/pievaluator.h +++ b/libs/main/math/pievaluator.h @@ -116,8 +116,6 @@ public: bool setVariableValue(const PIString & var_name, const complexd & new_value) {return setVariableValue(findVariable(var_name), new_value);} bool setVariableName(int index, const PIString & new_name); bool setVariableName(const PIString & var_name, const PIString & new_name) {return setVariableName(findVariable(var_name), new_name);} - void removeVariable(int index); - void removeVariable(const PIString & var_name) {removeVariable(findVariable(var_name));} void clearCustomVariables(); PIEvaluatorTypes::BaseFunctions getBaseFunction(const PIString & name); @@ -163,9 +161,6 @@ public: //! Evaluate last successfully checked with function \a check() expression and returns result complexd evaluate(); - //! Remove variable with name "name" - void removeVariable(const PIString & name) {content.removeVariable(name);} - //! Remove all manually added variables void clearCustomVariables() {content.clearCustomVariables();}