mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Replace scoped_ptr by unique_ptr
This commit is contained in:
@@ -51,7 +51,7 @@ ScriptValueP Context::eval(const Script& script, bool useScope) {
|
||||
// Evaluate the current instruction
|
||||
Instruction i = *instr++;
|
||||
// If a scope is created, destroy it at end of block.
|
||||
scoped_ptr<LocalScope> new_scope;
|
||||
unique_ptr<LocalScope> new_scope;
|
||||
|
||||
switch (i.instr) {
|
||||
case I_NOP: break;
|
||||
|
||||
@@ -511,7 +511,7 @@ ScriptValueP ScriptClosure::simplify() {
|
||||
}
|
||||
|
||||
ScriptValueP ScriptClosure::do_eval(Context& ctx, bool openScope) const {
|
||||
scoped_ptr<LocalScope> scope(openScope ? new LocalScope(ctx) : nullptr);
|
||||
unique_ptr<LocalScope> scope = openScope ? make_unique<LocalScope>(ctx) : nullptr;
|
||||
applyBindings(ctx);
|
||||
return fun->eval(ctx, openScope);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user