Browse Source

Change NumericEvaluator::clear() to optionally accept an object to clear

pull/5/merge
Maciej Suminski 8 years ago
committed by jean-pierre charras
parent
commit
5f2b8e0409
  1. 4
      common/libeval/numeric_evaluator.cpp
  2. 4
      include/libeval/numeric_evaluator.h

4
common/libeval/numeric_evaluator.cpp

@ -96,12 +96,14 @@ NumericEvaluator :: init()
}
void
NumericEvaluator :: clear()
NumericEvaluator :: clear(const void* pObj)
{
free(clToken.token);
clToken.token = nullptr;
clToken.input = nullptr;
bClError = true;
if (bClTextInputStorage && pObj) clObjMap.erase(pObj);
}
void

4
include/libeval/numeric_evaluator.h

@ -100,10 +100,10 @@ public:
/* Initialization and destruction. init() is invoked be the constructor and should not be needed
* by the user.
* clear() should be invoked by the user if a new input string is to be processed. It will reset
* the parser. User defined variables are retained.
* the parser and clear the original expression value for a requested object (if pObj != null).
*/
void init();
void clear();
void clear(const void* pObj = nullptr);
/* Set the decimal separator for the input string. Defaults to '.' */
void setDecimalSeparator(char sep);

Loading…
Cancel
Save