This commit is contained in:
aozhiwei 2022-12-27 09:32:44 +08:00
parent 399eed8bd8
commit 73177454cc
2 changed files with 5 additions and 18 deletions

View File

@ -8,28 +8,18 @@ namespace a8
{
}
a8::MutableXObject* MutableXObject::NewObject()
std::shared_ptr<a8::MutableXObject> MutableXObject::CreateObject()
{
a8::MutableXObject* obj = new a8::MutableXObject();
obj->ConvertObject();
return obj;
}
a8::MutableXObject* MutableXObject::NewArray()
{
a8::MutableXObject* obj = new a8::MutableXObject();
obj->ConvertArray();
return obj;
}
std::shared_ptr<a8::MutableXObject> MutableXObject::CreateObject()
{
return std::shared_ptr<a8::MutableXObject>(NewObject());
return std::shared_ptr<a8::MutableXObject>(obj);
}
std::shared_ptr<a8::MutableXObject> MutableXObject::CreateArray()
{
return std::shared_ptr<a8::MutableXObject>(NewArray());
a8::MutableXObject* obj = new a8::MutableXObject();
obj->ConvertArray();
return std::shared_ptr<a8::MutableXObject>(obj);
}
a8::MutableXObject& MutableXObject::Push(a8::XValue val)

View File

@ -10,9 +10,6 @@ namespace a8
public:
static a8::MutableXObject* NewObject();
static a8::MutableXObject* NewArray();
static std::shared_ptr<a8::MutableXObject> CreateObject();
static std::shared_ptr<a8::MutableXObject> CreateArray();