mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-07 18:21:16 -03:00
[muparser] Remove copy and assignment
There is no reason for muParsers to be copyable or assignable. Also remove some dead code and switch an auto_ptr to unique_ptr.
This commit is contained in:
@@ -92,8 +92,8 @@ class ParserBase {
|
||||
static void EnableDebugDump(bool bDumpCmd, bool bDumpStack);
|
||||
|
||||
ParserBase();
|
||||
ParserBase(const ParserBase &a_Parser);
|
||||
ParserBase &operator=(const ParserBase &a_Parser);
|
||||
ParserBase(const ParserBase &a_Parser) = delete;
|
||||
ParserBase &operator=(const ParserBase &a_Parser) = delete;
|
||||
|
||||
virtual ~ParserBase();
|
||||
|
||||
@@ -212,7 +212,6 @@ class ParserBase {
|
||||
};
|
||||
|
||||
private:
|
||||
void Assign(const ParserBase &a_Parser);
|
||||
void InitTokenReader();
|
||||
void ReInit() const;
|
||||
|
||||
|
||||
@@ -95,13 +95,10 @@ class ParserByteCode {
|
||||
/** \brief The actual rpn storage. */
|
||||
rpn_type m_vRPN;
|
||||
|
||||
void ConstantFolding(ECmdCode a_Oprt);
|
||||
|
||||
public:
|
||||
ParserByteCode();
|
||||
ParserByteCode(const ParserByteCode &a_ByteCode);
|
||||
ParserByteCode &operator=(const ParserByteCode &a_ByteCode);
|
||||
void Assign(const ParserByteCode &a_ByteCode);
|
||||
ParserByteCode(const ParserByteCode &a_ByteCode) = default;
|
||||
ParserByteCode &operator=(const ParserByteCode &a_ByteCode) = default;
|
||||
|
||||
void AddVar(value_type *a_pVar);
|
||||
void AddVal(value_type a_fVal);
|
||||
|
||||
@@ -65,7 +65,7 @@ class ParserToken {
|
||||
TString m_strTok; ///< Token string
|
||||
TString m_strVal; ///< Value for string variables
|
||||
value_type m_fVal; ///< the value
|
||||
std::auto_ptr<ParserCallback> m_pCallback;
|
||||
std::unique_ptr<ParserCallback> m_pCallback;
|
||||
|
||||
public:
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user