mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-21 03:21:16 -03:00
[muparser] Remove m_pParseFormula function pointer
This is a very strange design that determines whether initialization needs to be performed by reassigning a function pointer. A misguided optimization? Just check explicitly.
This commit is contained in:
@@ -230,10 +230,13 @@ class ParserBase {
|
||||
|
||||
OptionalError CreateRPN() const;
|
||||
|
||||
ValueOrError ParseString() const;
|
||||
ValueOrError ParseCmdCode() const;
|
||||
ValueOrError ExecuteRPN() const;
|
||||
ValueOrError InvokeFunction(generic_fun_type func, const value_type *args, int argCount) const;
|
||||
|
||||
/// Build the RPN if necessary, and then execute it.
|
||||
/// \return the result, or an error.
|
||||
ValueOrError BuildAndExecuteRPN() const;
|
||||
|
||||
OptionalError CheckName(const string_type &a_strName, const string_type &a_CharSet) const;
|
||||
OptionalError CheckOprt(const string_type &a_sName, const ParserCallback &a_Callback,
|
||||
const string_type &a_szCharSet) const;
|
||||
@@ -245,7 +248,6 @@ class ParserBase {
|
||||
|
||||
Eval() calls the function whose address is stored there.
|
||||
*/
|
||||
mutable ParseFunction m_pParseFormula;
|
||||
mutable ParserByteCode m_vRPN; ///< The Bytecode class.
|
||||
mutable stringbuf_type
|
||||
m_vStringBuf; ///< String buffer, used for storing string function arguments
|
||||
|
||||
@@ -112,6 +112,7 @@ class ParserByteCode {
|
||||
void clear();
|
||||
std::size_t GetMaxStackSize() const;
|
||||
std::size_t GetSize() const;
|
||||
bool empty() const { return GetSize() == 0; }
|
||||
|
||||
const SToken *GetBase() const;
|
||||
void AsciiDump();
|
||||
|
||||
Reference in New Issue
Block a user