mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-27 15:11:36 -04:00
implement move constructor
This commit is contained in:
parent
8958e29187
commit
a16727d5e3
@ -171,7 +171,7 @@ namespace MWScript
|
||||
{
|
||||
Compiler::Locals locals;
|
||||
|
||||
Compiler::ContextRestore restore = mErrorHandler.setContext(name2 + "[local variables]", true);
|
||||
const Compiler::ContextRestore&& restore = mErrorHandler.setContext(name2 + "[local variables]", true);
|
||||
|
||||
std::istringstream stream (script->mScriptText);
|
||||
Compiler::QuickFileParser parser (mErrorHandler, mCompilerContext, locals);
|
||||
|
@ -72,6 +72,11 @@ namespace Compiler
|
||||
|
||||
ContextRestore::ContextRestore(StreamErrorHandler* handler, const std::string& context) : mHandler(handler), mContext(context) {}
|
||||
|
||||
ContextRestore::ContextRestore(ContextRestore&& other) : mHandler(other.mHandler), mContext(other.mContext)
|
||||
{
|
||||
other.mHandler = nullptr;
|
||||
}
|
||||
|
||||
ContextRestore::~ContextRestore()
|
||||
{
|
||||
if(mHandler)
|
||||
|
@ -42,6 +42,8 @@ namespace Compiler
|
||||
public:
|
||||
ContextRestore (StreamErrorHandler* handler, const std::string& context);
|
||||
|
||||
ContextRestore (ContextRestore&& other);
|
||||
|
||||
~ContextRestore();
|
||||
};
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user