+3
-10
@@ -4,12 +4,6 @@
|
||||
|
||||
namespace furvm {
|
||||
|
||||
function::function(funkcja, function_handle id, std::size_t position, const mod_p& mod)
|
||||
: m_id(id), m_type(function_t::Normal), m_module(mod), m_value(position) {}
|
||||
|
||||
function::function(funkcja, function_handle id, const native_function& native, const mod_p& mod)
|
||||
: m_id(id), m_type(function_t::Native), m_module(mod), m_value(native) {}
|
||||
|
||||
function::~function() {
|
||||
switch (m_type) {
|
||||
case function_t::Normal:
|
||||
@@ -22,7 +16,7 @@ function::~function() {
|
||||
}
|
||||
|
||||
function::function(function&& other) noexcept
|
||||
: m_id(other.m_id), m_type(other.m_type), m_module(std::move(other.m_module)) {
|
||||
: m_name(std::move(other.m_name)), m_type(other.m_type) {
|
||||
switch (m_type) {
|
||||
case function_t::Normal: {
|
||||
m_value.position = other.m_value.position;
|
||||
@@ -41,9 +35,8 @@ function::function(function&& other) noexcept
|
||||
function& function::operator=(function&& other) noexcept {
|
||||
if (this == &other) return *this;
|
||||
|
||||
m_id = other.m_id;
|
||||
m_type = other.m_type;
|
||||
m_module = std::move(other.m_module);
|
||||
m_name = std::move(other.m_name);
|
||||
m_type = other.m_type;
|
||||
switch (m_type) {
|
||||
case function_t::Normal: {
|
||||
m_value.position = other.m_value.position;
|
||||
|
||||
Reference in New Issue
Block a user