Skip to content

Commit

Permalink
simple refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
scheffle committed Dec 21, 2023
1 parent 116d882 commit 709ee2b
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions vstgui/uidescription-scripting/tiny-js/TinyJS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -828,24 +828,20 @@ std::string CScriptLex::getPosition (size_t pos) const
// -----------------------------------------------------------------------------------
// CSCRIPTVARLINK

CScriptVarLink::CScriptVarLink (CScriptVar* var, const std::string& name, bool own)
CScriptVarLink::CScriptVarLink (CScriptVar* inVar, const std::string& inName, bool own)
: name (inName), var (inVar->addRef ()), isOwned (own)
{
#if DEBUG_MEMORY
mark_allocated (this);
#endif
this->name = name;
this->var = var->addRef ();
this->isOwned = own;
}

CScriptVarLink::CScriptVarLink (const CScriptVarLink& link)
: name (link.name), var (link.var->addRef ())
{
// Copy constructor
#if DEBUG_MEMORY
mark_allocated (this);
#endif
this->name = link.name;
this->var = link.var->addRef ();
}

CScriptVarLink::~CScriptVarLink ()
Expand Down

0 comments on commit 709ee2b

Please sign in to comment.