mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-29 10:02:14 +00:00
Reduce code smell -Remove setPrototype method in constructor/destructor. (#109)
https://sonarcloud.io/project/issues?id=pando-project_escargot&resolved=false&rules=cpp%3AS1699&severities=CRITICAL&sinceLeakPeriod=true&types=CODE_SMELL Signed-off-by: Bence Gabor Kis <kisbg@inf.u-szeged.hu>
This commit is contained in:
parent
8fbf6d05ed
commit
02f462a481
14 changed files with 28 additions and 28 deletions
|
|
@ -29,7 +29,7 @@ StringObject::StringObject(ExecutionState& state, String* value)
|
|||
{
|
||||
m_structure = state.context()->defaultStructureForStringObject();
|
||||
m_values[ESCARGOT_OBJECT_BUILTIN_PROPERTY_NUMBER] = Value();
|
||||
setPrototype(state, state.context()->globalObject()->stringPrototype());
|
||||
Object::setPrototype(state, state.context()->globalObject()->stringPrototype());
|
||||
}
|
||||
|
||||
void* StringObject::operator new(size_t size)
|
||||
|
|
@ -105,7 +105,7 @@ StringIteratorObject::StringIteratorObject(ExecutionState& state, String* s)
|
|||
, m_string(s)
|
||||
, m_iteratorNextIndex(0)
|
||||
{
|
||||
setPrototype(state, state.context()->globalObject()->stringIteratorPrototype());
|
||||
Object::setPrototype(state, state.context()->globalObject()->stringIteratorPrototype());
|
||||
}
|
||||
|
||||
void* StringIteratorObject::operator new(size_t size)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue