[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:
ridiculousfish
2017-11-22 13:27:09 -08:00
parent 65f4963542
commit 9443a4bf2d
6 changed files with 13 additions and 218 deletions

View File

@@ -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;

View File

@@ -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);

View File

@@ -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:
//---------------------------------------------------------------------------