ronantakizawa/codereview-bench huggingface dataset:
Repository: godotengine/godot
File: scene/resources/curve.cpp (C++)

Code before:
}

void Curve3D::set_point_in(int p_index, const Vector3 &p_in) {
	ERR_FAIL_INDEX(p_index, points.size());

	points.write[p_index].in = p_in;
	mark_dirty();
}

Vector3 Curve3D::get_point_in(int p_index) const {
	ERR_FAIL_INDEX_V(p_index, points.size(), Vector3());
	return points[p_index].in;
}

void Curve3D::set_point_out(int p_index, const Vector3 &p_out) {
	ERR_FAIL_INDEX(p_index, points.size());

	points.write[p_index].out = p_out;
	mark_dirty();
}

Vector3 Curve3D::get_point_out(int p_index) const {
	ERR_FAIL_INDEX_V(p_index, points.size(), Vector3());
	return points[p_index].out;
}

void Curve3D::_remove_point(int p_index) {
	ERR_FAIL_INDEX(p_index, points.size());
	points.remove_at(p_index);
	mark_dirty();
}

void Curve3D::remove_point(int p_index) {
	_remove_point(p_index);
	notify_property_list_changed();
}

void Curve3D::clear_points() {
	if (!points.is_empty()) {
		points.clear();
		mark_dirty();
		notify_property_list_changed();
	}
}

Vector3 Curve3D::sample(int p_index, real_t p_offset) const {
	int pc = points.size();
	ERR_FAIL_COND_V(pc == 0, Vector3());

	if (p_index >= pc - 1) {
		return points[pc - 1].position;

Review comment (suggestion):
```suggestion
	if (closed && points.size() < 3) {
```

Code after:
Vector3 Curve3D::get_point_in(int p_index) const {
	ERR_FAIL_INDEX_V(p_index, points.size(), Vector3());
	return points[p_index].in;
}

void Curve3D::set_point_out(int p_index, const Vector3 &p_out) {
	ERR_FAIL_INDEX(p_index, points.size());

	points.write[p_index].out = p_out;
	mark_dirty();
}

Vector3 Curve3D::get_point_out(int p_index) const {
	ERR_FAIL_INDEX_V(p_index, points.size(), Vector3());
	return points[p_index].out;
}

void Curve3D::_remove_point(int p_index) {
	ERR_FAIL_INDEX(p_index, points.size());
	points.remove_at(p_index);
	mark_dirty();
}

void Curve3D::remove_point(int p_index) {
	_remove_point(p_index);
	if (closed && points.size() < 2) {
		set_closed(false);
	}
	notify_property_list_changed();
}

void Curve3D::clear_points() {
	if (!points.is_empty()) {
		points.clear();
		mark_dirty();
		notify_property_list_changed();
	}
}

Vector3 Curve3D::sample(int p_index, real_t p_offset) const {
	int pc = points.size();
	ERR_FAIL_COND_V(pc == 0, Vector3());

	if (p_index >= pc - 1) {
		if (!closed) {
			return points[pc - 1].position;
		} else {
			p_index = pc - 1;
		}
	} else if (p_index < 0) {
		return points[0].position;
Repository: godotengine/godot
File: editor/plugins/mesh_instance_3d_editor_plugin.h (C/C++)

Code before:

	MenuButton *options = nullptr;

	ConfirmationDialog *outline_dialog = nullptr;
	SpinBox *outline_size = nullptr;

	AcceptDialog *err_dialog = nullptr;

	AcceptDialog *debug_uv_dialog = nullptr;
	Control *debug_uv = nullptr;
	Vector<Vector2> uv_lines;

	void _menu_option(int p_option);
	void _create_outline_mesh();

	void _create_uv_lines(int p_layer);
	friend class MeshInstance3DEditorPlugin;

	void _debug_uv_draw();

protected:
	void _node_removed(Node *p_node);

	void _notification(int p_what);

public:
	void edit(MeshInstance3D *p_mesh);
	MeshInstance3DEditor();
};

class MeshInstance3DEditorPlugin : public EditorPlugin {
	GDCLASS(MeshInstance3DEditorPlugin, EditorPlugin);

	MeshInstance3DEditor *mesh_editor = nullptr;

public:
	virtual String get_name() const override { return "MeshInstance3D"; }
	bool has_main_screen() const override { return false; }
	virtual void edit(Object *p_object) override;
	virtual bool handles(Object *p_object) const override;
	virtual void make_visible(bool p_visible) override;

	MeshInstance3DEditorPlugin();
	~MeshInstance3DEditorPlugin();
};

#endif // MESH_INSTANCE_3D_EDITOR_PLUGIN_H


Review comment (suggestion):
```suggestion
	Vector<Ref<Shape3D>> create_shape_from_mesh(Ref<Mesh> p_mesh, int p_option, bool p_verbose);
```
Prefix arguments with `p_`

Code after:

	enum ShapeType {
		SHAPE_TYPE_TRIMESH,
		SHAPE_TYPE_SINGLE_CONVEX,
		SHAPE_TYPE_SIMPLIFIED_CONVEX,
		SHAPE_TYPE_MULTIPLE_CONVEX,
	};

	MeshInstance3D *node = nullptr;

	MenuButton *options = nullptr;

	ConfirmationDialog *outline_dialog = nullptr;
	SpinBox *outline_size = nullptr;

	ConfirmationDialog *shape_dialog = nullptr;
	OptionButton *shape_type = nullptr;
	OptionButton *shape_placement = nullptr;

	AcceptDialog *err_dialog = nullptr;

	AcceptDialog *debug_uv_dialog = nullptr;
	Control *debug_uv = nullptr;
	Vector<Vector2> uv_lines;

	void _create_collision_shape();
	Vector<Ref<Shape3D>> create_shape_from_mesh(Ref<Mesh> p_mesh, int p_option, bool p_verbose);
	void _menu_option(int p_option);
	void _create_outline_mesh();

	void _create_uv_lines(int p_layer);
	friend class MeshInstance3DEditorPlugin;

	void _debug_uv_draw();

protected:
	void _node_removed(Node *p_node);

	void _notification(int p_what);

public:
	void edit(MeshInstance3D *p_mesh);
	MeshInstance3DEditor();
};

class MeshInstance3DEditorPlugin : public EditorPlugin {
	GDCLASS(MeshInstance3DEditorPlugin, EditorPlugin);

	MeshInstance3DEditor *mesh_editor = nullptr;

public:
Repository: godotengine/godot
File: editor/animation_track_editor.cpp (C++)

Code before:
		case EDIT_SCALE_SELECTION:
		case EDIT_SCALE_FROM_CURSOR: {
			scale_dialog->popup_centered(Size2(200, 100) * EDSCALE);
		} break;
		case EDIT_SCALE_CONFIRM: {
			if (selection.is_empty()) {
				return;
			}

			float from_t = 1e20;
			float to_t = -1e20;
			float len = -1e20;
			float pivot = 0;

			for (const KeyValue<SelectedKey, KeyInfo> &E : selection) {
				float t = animation->track_get_key_time(E.key.track, E.key.key);
				if (t < from_t) {
					from_t = t;
				}
				if (t > to_t) {
					to_t = t;
				}
			}

			len = to_t - from_t;
			if (last_menu_track_opt == EDIT_SCALE_FROM_CURSOR) {
				pivot = timeline->get_play_position();

			} else {
				pivot = from_t;
			}

			float s = scale->get_value();
			ERR_FAIL_COND_MSG(s == 0, "Can't scale to 0.");

			EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
			undo_redo->create_action(TTR("Animation Scale Keys"));

			List<_AnimMoveRestore> to_restore;

			// 1 - Remove the keys.
			for (RBMap<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) {
				undo_redo->add_do_method(animation.ptr(), "track_remove_key", E->key().track, E->key().key);
			}
			// 2 - Remove overlapped keys.
			for (RBMap<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) {
				float newtime = (E->get().pos - from_t) * s + from_t;
				int idx = animation->track_find_key(E->key().track, newtime, Animation::FIND_MODE_APPROX);
				if (idx == -1) {
					continue;
				}

Review comment (suggestion):
```suggestion
			if (moving_selection || selection.is_empty()) {
```

Code after:
				}

				undo_redo->add_undo_method(animation.ptr(), "remove_track", animation->get_track_count());

				base_track++;
			}

			undo_redo->commit_action();
		} break;

		case EDIT_SCALE_SELECTION:
		case EDIT_SCALE_FROM_CURSOR: {
			scale_dialog->popup_centered(Size2(200, 100) * EDSCALE);
		} break;
		case EDIT_SCALE_CONFIRM: {
			if (selection.is_empty()) {
				return;
			}

			float from_t = 1e20;
			float to_t = -1e20;
			float len = -1e20;
			float pivot = 0;

			for (const KeyValue<SelectedKey, KeyInfo> &E : selection) {
				float t = animation->track_get_key_time(E.key.track, E.key.key);
				if (t < from_t) {
					from_t = t;
				}
				if (t > to_t) {
					to_t = t;
				}
			}

			len = to_t - from_t;
			if (last_menu_track_opt == EDIT_SCALE_FROM_CURSOR) {
				pivot = timeline->get_play_position();

			} else {
				pivot = from_t;
			}

			float s = scale->get_value();
			ERR_FAIL_COND_MSG(s == 0, "Can't scale to 0.");

			EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
			undo_redo->create_action(TTR("Animation Scale Keys"));

			List<_AnimMoveRestore> to_restore;

			// 1 - Remove the keys.
Repository: godotengine/godot
File: scene/main/node.cpp (C++)

Code before:
	String old_name = data.name;
	data.name = name;

	if (data.parent) {
		data.parent->_validate_child_name(this, true);
		bool success = data.parent->data.children.replace_key(old_name, data.name);
		ERR_FAIL_COND_MSG(!success, "Renaming child in hashtable failed, this is a bug.");
	}

	if (data.unique_name_in_owner && data.owner) {
		_acquire_unique_name_in_owner();
	}

	propagate_notification(NOTIFICATION_PATH_RENAMED);

	if (is_inside_tree()) {
		emit_signal(SNAME("renamed"));
		get_tree()->node_renamed(this);
		get_tree()->tree_changed();
	}
}

// Returns a clear description of this node depending on what is available. Useful for error messages.
String Node::get_description() const {
	String description;
	if (is_inside_tree()) {
		description = get_path();
	} else {
		description = get_name();
		if (description.is_empty()) {
			description = get_class();
		}
	}
	return description;
}

static SafeRefCount node_hrcr_count;

void Node::init_node_hrcr() {
	node_hrcr_count.init(1);
}

#ifdef TOOLS_ENABLED
String Node::validate_child_name(Node *p_child) {
	StringName name = p_child->data.name;
	_generate_serial_child_name(p_child, name);
	return name;
}

String Node::prevalidate_child_name(Node *p_child, StringName p_name) {
	_generate_serial_child_name(p_child, p_name);

Review comment (performance):
Maybe make this mutable instead, there's already `path_cache`

Code after:
	} else {
		remove_from_group("_vp_unhandled_key_input" + itos(get_viewport()->get_instance_id()));
	}
}

bool Node::is_processing_unhandled_key_input() const {
	return data.unhandled_key_input;
}

void Node::set_auto_translate_mode(AutoTranslateMode p_mode) {
	ERR_THREAD_GUARD
	if (data.auto_translate_mode == p_mode) {
		return;
	}

	if (p_mode == AUTO_TRANSLATE_MODE_INHERIT && data.inside_tree && !data.parent) {
		ERR_FAIL_MSG("The root node can't be set to Inherit auto translate mode.");
	}

	data.auto_translate_mode = p_mode;
	data.is_auto_translating = p_mode != AUTO_TRANSLATE_MODE_DISABLED;
	data.is_auto_translate_dirty = true;

	propagate_notification(NOTIFICATION_TRANSLATION_CHANGED);
}

Node::AutoTranslateMode Node::get_auto_translate_mode() const {
	return data.auto_translate_mode;
}

bool Node::can_auto_translate() const {
	ERR_READ_THREAD_GUARD_V(false);
	if (!data.is_auto_translate_dirty || data.auto_translate_mode != AUTO_TRANSLATE_MODE_INHERIT) {
		return data.is_auto_translating;
	}

	data.is_auto_translate_dirty = false;

	Node *parent = data.parent;
	while (parent) {
		if (parent->data.auto_translate_mode == AUTO_TRANSLATE_MODE_INHERIT) {
			parent = parent->data.parent;
			continue;
		}

		data.is_auto_translating = parent->data.auto_translate_mode == AUTO_TRANSLATE_MODE_ALWAYS;
		break;
	}

	return data.is_auto_translating;
}
Repository: godotengine/godot
File: scene/main/node.cpp (C++)

Code before:
bool Node::is_processing_unhandled_key_input() const {
	return data.unhandled_key_input;
}

StringName Node::get_name() const {
	return data.name;
}

void Node::_set_name_nocheck(const StringName &p_name) {
	data.name = p_name;
}

void Node::set_name(const String &p_name) {
	ERR_FAIL_COND_MSG(data.inside_tree && !Thread::is_main_thread(), "Changing the name to nodes inside the SceneTree is only allowed from the main thread. Use `set_name.call_deferred(new_name)`.");
	String name = p_name.validate_node_name();

	ERR_FAIL_COND(name.is_empty());

	if (data.unique_name_in_owner && data.owner) {
		_release_unique_name_in_owner();
	}
	String old_name = data.name;
	data.name = name;

	if (data.parent) {
		data.parent->_validate_child_name(this, true);
		bool success = data.parent->data.children.replace_key(old_name, data.name);
		ERR_FAIL_COND_MSG(!success, "Renaming child in hashtable failed, this is a bug.");
	}

	if (data.unique_name_in_owner && data.owner) {
		_acquire_unique_name_in_owner();
	}

	propagate_notification(NOTIFICATION_PATH_RENAMED);

	if (is_inside_tree()) {
		emit_signal(SNAME("renamed"));
		get_tree()->node_renamed(this);
		get_tree()->tree_changed();
	}
}

// Returns a clear description of this node depending on what is available. Useful for error messages.
String Node::get_description() const {
	String description;
	if (is_inside_tree()) {
		description = get_path();
	} else {
		description = get_name();
		if (description.is_empty()) {

Review comment (suggestion):
```suggestion
	if (p_mode == AUTO_TRANSLATE_MODE_INHERIT && data.inside_tree && !data.parent) {
```

Code after:
	} else {
		remove_from_group("_vp_unhandled_input" + itos(get_viewport()->get_instance_id()));
	}
}

bool Node::is_processing_unhandled_input() const {
	return data.unhandled_input;
}

void Node::set_process_unhandled_key_input(bool p_enable) {
	ERR_THREAD_GUARD
	if (p_enable == data.unhandled_key_input) {
		return;
	}
	data.unhandled_key_input = p_enable;
	if (!is_inside_tree()) {
		return;
	}

	if (p_enable) {
		add_to_group("_vp_unhandled_key_input" + itos(get_viewport()->get_instance_id()));
	} else {
		remove_from_group("_vp_unhandled_key_input" + itos(get_viewport()->get_instance_id()));
	}
}

bool Node::is_processing_unhandled_key_input() const {
	return data.unhandled_key_input;
}

void Node::set_auto_translate_mode(AutoTranslateMode p_mode) {
	ERR_THREAD_GUARD
	if (data.auto_translate_mode == p_mode) {
		return;
	}

	if (p_mode == AUTO_TRANSLATE_MODE_INHERIT && data.inside_tree && !data.parent) {
		ERR_FAIL_MSG("The root node can't be set to Inherit auto translate mode.");
	}

	data.auto_translate_mode = p_mode;
	data.is_auto_translating = p_mode != AUTO_TRANSLATE_MODE_DISABLED;
	data.is_auto_translate_dirty = true;

	propagate_notification(NOTIFICATION_TRANSLATION_CHANGED);
}

Node::AutoTranslateMode Node::get_auto_translate_mode() const {
	return data.auto_translate_mode;
}
Repository: godotengine/godot
File: scene/main/node.cpp (C++)

Code before:
				Node *n = data.owned.back()->get();
				n->_clean_up_owner(); // This will change data.owned. So it's impossible to loop over the list in the usual manner.
			}

			if (data.parent) {
				data.parent->remove_child(this);
			}

			// kill children as cleanly as possible
			while (data.children.size()) {
				Node *child = data.children.last()->value; // begin from the end because its faster and more consistent with creation
				memdelete(child);
			}
		} break;
	}
}

void Node::_propagate_ready() {
	data.ready_notified = true;
	data.blocked++;
	for (KeyValue<StringName, Node *> &K : data.children) {
		K.value->_propagate_ready();
	}

	data.blocked--;

	notification(NOTIFICATION_POST_ENTER_TREE);

	if (data.ready_first) {
		data.ready_first = false;
		notification(NOTIFICATION_READY);
		emit_signal(SceneStringNames::get_singleton()->ready);
	}
}

void Node::_propagate_enter_tree() {
	// this needs to happen to all children before any enter_tree

	if (data.parent) {
		data.tree = data.parent->data.tree;
		data.depth = data.parent->data.depth + 1;
	} else {
		data.depth = 1;
	}

	data.viewport = Object::cast_to<Viewport>(this);
	if (!data.viewport && data.parent) {
		data.viewport = data.parent->data.viewport;
	}

	data.inside_tree = true;

Review comment (suggestion):
```suggestion
			if (data.inside_tree) {
```
Mostly for consistency (though it's slightly more performant if the compiler does not inline it automatically).

Code after:

			GDVIRTUAL_CALL(_ready);
		} break;

		case NOTIFICATION_POSTINITIALIZE: {
			data.in_constructor = false;
		} break;

		case NOTIFICATION_PREDELETE: {
			if (data.inside_tree && !Thread::is_main_thread()) {
				cancel_free();
				ERR_PRINT("Attempted to free a node that is currently added to the SceneTree from a thread. This is not permitted, use queue_free() instead. Node has not been freed.");
				return;
			}

			if (data.owner) {
				_clean_up_owner();
			}

			while (!data.owned.is_empty()) {
				Node *n = data.owned.back()->get();
				n->_clean_up_owner(); // This will change data.owned. So it's impossible to loop over the list in the usual manner.
			}

			if (data.parent) {
				data.parent->remove_child(this);
			}

			// kill children as cleanly as possible
			while (data.children.size()) {
				Node *child = data.children.last()->value; // begin from the end because its faster and more consistent with creation
				memdelete(child);
			}
		} break;

		case NOTIFICATION_TRANSLATION_CHANGED: {
			if (data.inside_tree) {
				data.is_auto_translate_dirty = true;
			}
		} break;
	}
}

void Node::_propagate_ready() {
	data.ready_notified = true;
	data.blocked++;
	for (KeyValue<StringName, Node *> &K : data.children) {
		K.value->_propagate_ready();
	}

	data.blocked--;
Repository: godotengine/godot
File: scene/main/node.cpp (C++)

Code before:
	data.name = name;

	if (data.parent) {
		data.parent->_validate_child_name(this, true);
		bool success = data.parent->data.children.replace_key(old_name, data.name);
		ERR_FAIL_COND_MSG(!success, "Renaming child in hashtable failed, this is a bug.");
	}

	if (data.unique_name_in_owner && data.owner) {
		_acquire_unique_name_in_owner();
	}

	propagate_notification(NOTIFICATION_PATH_RENAMED);

	if (is_inside_tree()) {
		emit_signal(SNAME("renamed"));
		get_tree()->node_renamed(this);
		get_tree()->tree_changed();
	}
}

// Returns a clear description of this node depending on what is available. Useful for error messages.
String Node::get_description() const {
	String description;
	if (is_inside_tree()) {
		description = get_path();
	} else {
		description = get_name();
		if (description.is_empty()) {
			description = get_class();
		}
	}
	return description;
}

static SafeRefCount node_hrcr_count;

void Node::init_node_hrcr() {
	node_hrcr_count.init(1);
}

#ifdef TOOLS_ENABLED
String Node::validate_child_name(Node *p_child) {
	StringName name = p_child->data.name;
	_generate_serial_child_name(p_child, name);
	return name;
}

String Node::prevalidate_child_name(Node *p_child, StringName p_name) {
	_generate_serial_child_name(p_child, p_name);
	return p_name;

Review comment (bug):
I don't think we include the enum prefix in the same class that defines it usually (might be wrong though, didn't check).
```suggestion
AutoTranslateMode Node::get_auto_translate_mode() const {
```

Code after:
		remove_from_group("_vp_unhandled_key_input" + itos(get_viewport()->get_instance_id()));
	}
}

bool Node::is_processing_unhandled_key_input() const {
	return data.unhandled_key_input;
}

void Node::set_auto_translate_mode(AutoTranslateMode p_mode) {
	ERR_THREAD_GUARD
	if (data.auto_translate_mode == p_mode) {
		return;
	}

	if (p_mode == AUTO_TRANSLATE_MODE_INHERIT && data.inside_tree && !data.parent) {
		ERR_FAIL_MSG("The root node can't be set to Inherit auto translate mode.");
	}

	data.auto_translate_mode = p_mode;
	data.is_auto_translating = p_mode != AUTO_TRANSLATE_MODE_DISABLED;
	data.is_auto_translate_dirty = true;

	propagate_notification(NOTIFICATION_TRANSLATION_CHANGED);
}

Node::AutoTranslateMode Node::get_auto_translate_mode() const {
	return data.auto_translate_mode;
}

bool Node::can_auto_translate() const {
	ERR_READ_THREAD_GUARD_V(false);
	if (!data.is_auto_translate_dirty || data.auto_translate_mode != AUTO_TRANSLATE_MODE_INHERIT) {
		return data.is_auto_translating;
	}

	data.is_auto_translate_dirty = false;

	Node *parent = data.parent;
	while (parent) {
		if (parent->data.auto_translate_mode == AUTO_TRANSLATE_MODE_INHERIT) {
			parent = parent->data.parent;
			continue;
		}

		data.is_auto_translating = parent->data.auto_translate_mode == AUTO_TRANSLATE_MODE_ALWAYS;
		break;
	}

	return data.is_auto_translating;
}
Repository: godotengine/godot
File: modules/gdscript/gdscript_parser.h (C/C++)

Code before:
			if (kind != p_other.kind) {
				return false;
			}

			switch (kind) {
				case VARIANT:
					return true; // All variants are the same.
				case BUILTIN:
					return builtin_type == p_other.builtin_type;
				case NATIVE:
				case ENUM: // Enums use native_type to identify the enum and its base class.
					return native_type == p_other.native_type;
				case SCRIPT:
					return script_type == p_other.script_type;
				case CLASS:
					return class_type == p_other.class_type || class_type->fqcn == p_other.class_type->fqcn;
				case RESOLVING:
				case UNRESOLVED:
					break;
			}

			return false;
		}

		bool operator!=(const DataType &p_other) const {
			return !(this->operator==(p_other));
		}

		void operator=(const DataType &p_other) {
			kind = p_other.kind;
			type_source = p_other.type_source;
			is_read_only = p_other.is_read_only;
			is_constant = p_other.is_constant;
			is_meta_type = p_other.is_meta_type;
			is_pseudo_type = p_other.is_pseudo_type;
			is_coroutine = p_other.is_coroutine;
			builtin_type = p_other.builtin_type;
			native_type = p_other.native_type;
			enum_type = p_other.enum_type;
			script_type = p_other.script_type;
			script_path = p_other.script_path;
			class_type = p_other.class_type;
			method_info = p_other.method_info;
			enum_values = p_other.enum_values;
			container_element_types = p_other.container_element_types;
		}

		DataType() = default;

		DataType(const DataType &p_other) {
			*this = p_other;

Review comment (suggestion):
```suggestion
			return !(*this == p_other);
```
Already added but will update after CI has run

Code after:
			if (kind != p_other.kind) {
				return false;
			}

			switch (kind) {
				case VARIANT:
					return true; // All variants are the same.
				case BUILTIN:
					return builtin_type == p_other.builtin_type;
				case NATIVE:
				case ENUM: // Enums use native_type to identify the enum and its base class.
					return native_type == p_other.native_type;
				case SCRIPT:
					return script_type == p_other.script_type;
				case CLASS:
					return class_type == p_other.class_type || class_type->fqcn == p_other.class_type->fqcn;
				case RESOLVING:
				case UNRESOLVED:
					break;
			}

			return false;
		}

		bool operator!=(const DataType &p_other) const {
			return !(*this == p_other);
		}

		void operator=(const DataType &p_other) {
			kind = p_other.kind;
			type_source = p_other.type_source;
			is_read_only = p_other.is_read_only;
			is_constant = p_other.is_constant;
			is_meta_type = p_other.is_meta_type;
			is_pseudo_type = p_other.is_pseudo_type;
			is_coroutine = p_other.is_coroutine;
			builtin_type = p_other.builtin_type;
			native_type = p_other.native_type;
			enum_type = p_other.enum_type;
			script_type = p_other.script_type;
			script_path = p_other.script_path;
			class_type = p_other.class_type;
			method_info = p_other.method_info;
			enum_values = p_other.enum_values;
			container_element_types = p_other.container_element_types;
		}

		DataType() = default;

		DataType(const DataType &p_other) {
			*this = p_other;