ronantakizawa/codereview-bench huggingface dataset:
Repository: godotengine/godot
File: editor/scene/sprite_frames_editor_plugin.h (C/C++)

Code before:
#include "scene/gui/spin_box.h"
#include "scene/gui/split_container.h"
#include "scene/gui/texture_rect.h"
#include "scene/gui/tree.h"
#include "scene/resources/image_texture.h"
#include "scene/resources/sprite_frames.h"

class OptionButton;
class EditorFileDialog;

class ClipboardSpriteFrames : public Resource {
	GDCLASS(ClipboardSpriteFrames, Resource);

public:
	struct Frame {
		Ref<Texture2D> texture;
		float duration;
	};
	Vector<Frame> frames;
};

class ClipboardAnimation : public Resource {
	GDCLASS(ClipboardAnimation, Resource);

public:
	String animation_name;
	Vector<ClipboardSpriteFrames::Frame> frames;
	float animation_speed = 1.0f;
	bool animation_loop = false;
	bool is_copy = false;
};

class SpriteFramesEditor : public HSplitContainer {
	GDCLASS(SpriteFramesEditor, HSplitContainer);

	Ref<SpriteFrames> frames;
	Node *animated_sprite = nullptr;

	enum {
		PARAM_USE_CURRENT, // Used in callbacks to indicate `dominant_param` should be not updated.
		PARAM_FRAME_COUNT, // Keep "Horizontal" & "Vertical" values.
		PARAM_SIZE, // Keep "Size" values.
	};
	int dominant_param = PARAM_FRAME_COUNT;

	enum {
		FRAME_ORDER_SELECTION, // Order frames were selected in.

		// By Row.
		FRAME_ORDER_LEFT_RIGHT_TOP_BOTTOM,
		FRAME_ORDER_LEFT_RIGHT_BOTTOM_TOP,

Review comment (suggestion):
This field isn't used, it's only assigned. Personally, I'd prefer the original animation name to be used after insertion (plus a numeric suffix if one already exists).

Code after:
#include "scene/gui/spin_box.h"
#include "scene/gui/split_container.h"
#include "scene/gui/texture_rect.h"
#include "scene/gui/tree.h"
#include "scene/resources/image_texture.h"
#include "scene/resources/sprite_frames.h"

class OptionButton;
class EditorFileDialog;

class ClipboardSpriteFrames : public Resource {
	GDCLASS(ClipboardSpriteFrames, Resource);

public:
	struct Frame {
		Ref<Texture2D> texture;
		float duration;
	};
	Vector<Frame> frames;
};

class ClipboardAnimation : public Resource {
	GDCLASS(ClipboardAnimation, Resource);

public:
	String name;
	Vector<ClipboardSpriteFrames::Frame> frames;
	float speed = 1.0f;
	bool loop = false;

	static Ref<ClipboardAnimation> from_sprite_frames(const Ref<SpriteFrames> &p_frames, const String &p_anim);
};

class SpriteFramesEditor : public HSplitContainer {
	GDCLASS(SpriteFramesEditor, HSplitContainer);

	Ref<SpriteFrames> frames;
	Node *animated_sprite = nullptr;

	enum {
		PARAM_USE_CURRENT, // Used in callbacks to indicate `dominant_param` should be not updated.
		PARAM_FRAME_COUNT, // Keep "Horizontal" & "Vertical" values.
		PARAM_SIZE, // Keep "Size" values.
	};
	int dominant_param = PARAM_FRAME_COUNT;

	enum {
		FRAME_ORDER_SELECTION, // Order frames were selected in.

		// By Row.
		FRAME_ORDER_LEFT_RIGHT_TOP_BOTTOM,
Repository: godotengine/godot
File: core/string/ustring.cpp (C++)

Code before:
	int r = 1;
	if (p_int < 0) {
		r += 1;
		if (p_int == INT64_MIN) {
			p_int = INT64_MAX;
		} else {
			p_int = -p_int;
		}
	}
	while (p_int >= 10) {
		p_int /= 10;
		r++;
	}
	return r;
}

String String::increment_numeric() const {
	String res = *this;
	bool carry = res.length() > 0;

	for (int i = res.length() - 1; i >= 0; i--) {
		if (!carry) {
			break;
		}
		char32_t n = operator[](i);
		if (n == '9') { // keep carry as true: 9 + 1
			res[i] = '0';
		} else {
			res[i] = operator[](i) + 1;
			carry = false;
		}
	}

	if (carry) {
		res = "1" + res;
	}

	return res;
}

int64_t String::to_int(const char32_t *p_str, int p_len, bool p_clamp) {
	if (p_len == 0 || !p_str[0]) {
		return 0;
	}
	///@todo make more exact so saving and loading does not lose precision

	int64_t integer = 0;
	int64_t sign = 1;
	int reading = READING_SIGN;

	const char32_t *str = p_str;

Review comment (suggestion):
```suggestion
		if (n == '9') { // Keep carry as true: 9 + 1.
```

Code after:
	int r = 1;
	if (p_int < 0) {
		r += 1;
		if (p_int == INT64_MIN) {
			p_int = INT64_MAX;
		} else {
			p_int = -p_int;
		}
	}
	while (p_int >= 10) {
		p_int /= 10;
		r++;
	}
	return r;
}

int64_t String::to_int(const char32_t *p_str, int p_len, bool p_clamp) {
	if (p_len == 0 || !p_str[0]) {
		return 0;
	}
	///@todo make more exact so saving and loading does not lose precision

	int64_t integer = 0;
	int64_t sign = 1;
	int reading = READING_SIGN;

	const char32_t *str = p_str;
	const char32_t *limit = &p_str[p_len];

	while (*str && reading != READING_DONE && str != limit) {
		char32_t c = *(str++);
		switch (reading) {
			case READING_SIGN: {
				if (is_digit(c)) {
					reading = READING_INT;
					// let it fallthrough
				} else if (c == '-') {
					sign = -1;
					reading = READING_INT;
					break;
				} else if (c == '+') {
					sign = 1;
					reading = READING_INT;
					break;
				} else {
					break;
				}
				[[fallthrough]];
			}
			case READING_INT: {
				if (is_digit(c)) {
Repository: godotengine/godot
File: editor/scene/sprite_frames_editor_plugin.h (C/C++)

Code before:
#include "scene/gui/tree.h"
#include "scene/resources/image_texture.h"
#include "scene/resources/sprite_frames.h"

class OptionButton;
class EditorFileDialog;

class ClipboardSpriteFrames : public Resource {
	GDCLASS(ClipboardSpriteFrames, Resource);

public:
	struct Frame {
		Ref<Texture2D> texture;
		float duration;
	};
	Vector<Frame> frames;
};

class ClipboardAnimation : public Resource {
	GDCLASS(ClipboardAnimation, Resource);

public:
	String animation_name;
	Vector<ClipboardSpriteFrames::Frame> animation_frames;
	float animation_speed = 1.0f;
	bool animation_loop = false;

	static Ref<ClipboardAnimation> from_sprite_frames(const Ref<SpriteFrames> &p_frames, const String &p_anim);
};

class SpriteFramesEditor : public HSplitContainer {
	GDCLASS(SpriteFramesEditor, HSplitContainer);

	Ref<SpriteFrames> frames;
	Node *animated_sprite = nullptr;

	enum {
		PARAM_USE_CURRENT, // Used in callbacks to indicate `dominant_param` should be not updated.
		PARAM_FRAME_COUNT, // Keep "Horizontal" & "Vertical" values.
		PARAM_SIZE, // Keep "Size" values.
	};
	int dominant_param = PARAM_FRAME_COUNT;

	enum {
		FRAME_ORDER_SELECTION, // Order frames were selected in.

		// By Row.
		FRAME_ORDER_LEFT_RIGHT_TOP_BOTTOM,
		FRAME_ORDER_LEFT_RIGHT_BOTTOM_TOP,
		FRAME_ORDER_RIGHT_LEFT_TOP_BOTTOM,
		FRAME_ORDER_RIGHT_LEFT_BOTTOM_TOP,

Review comment (suggestion):
The `animation_` prefix now appears redundant after the `is_copy` field was removed.

Code after:
#include "scene/gui/tree.h"
#include "scene/resources/image_texture.h"
#include "scene/resources/sprite_frames.h"

class OptionButton;
class EditorFileDialog;

class ClipboardSpriteFrames : public Resource {
	GDCLASS(ClipboardSpriteFrames, Resource);

public:
	struct Frame {
		Ref<Texture2D> texture;
		float duration;
	};
	Vector<Frame> frames;
};

class ClipboardAnimation : public Resource {
	GDCLASS(ClipboardAnimation, Resource);

public:
	String name;
	Vector<ClipboardSpriteFrames::Frame> frames;
	float speed = 1.0f;
	bool loop = false;

	static Ref<ClipboardAnimation> from_sprite_frames(const Ref<SpriteFrames> &p_frames, const String &p_anim);
};

class SpriteFramesEditor : public HSplitContainer {
	GDCLASS(SpriteFramesEditor, HSplitContainer);

	Ref<SpriteFrames> frames;
	Node *animated_sprite = nullptr;

	enum {
		PARAM_USE_CURRENT, // Used in callbacks to indicate `dominant_param` should be not updated.
		PARAM_FRAME_COUNT, // Keep "Horizontal" & "Vertical" values.
		PARAM_SIZE, // Keep "Size" values.
	};
	int dominant_param = PARAM_FRAME_COUNT;

	enum {
		FRAME_ORDER_SELECTION, // Order frames were selected in.

		// By Row.
		FRAME_ORDER_LEFT_RIGHT_TOP_BOTTOM,
		FRAME_ORDER_LEFT_RIGHT_BOTTOM_TOP,
		FRAME_ORDER_RIGHT_LEFT_TOP_BOTTOM,
		FRAME_ORDER_RIGHT_LEFT_BOTTOM_TOP,
Repository: godotengine/godot
File: editor/inspector/editor_properties.h (C/C++)

Code before:
	void _menu_pressed(int p_menu);
	void _refresh_names();

protected:
	void _notification(int p_what);
	virtual void _set_read_only(bool p_read_only) override;

public:
	void setup(LayerType p_layer_type);
	void set_layer_name(int p_index, const String &p_name);
	String get_layer_name(int p_index) const;
	virtual void update_property() override;
	EditorPropertyLayers();
};

class EditorPropertyInteger : public EditorProperty {
	GDCLASS(EditorPropertyInteger, EditorProperty);
	EditorSpinSlider *spin = nullptr;
	void _value_changed(int64_t p_val);

protected:
	virtual void _set_read_only(bool p_read_only) override;

public:
	virtual void update_property() override;
	void setup(EditorPropertyRangeHint p_range_hint);
	EditorPropertyInteger();
};

class EditorPropertyObjectID : public EditorProperty {
	GDCLASS(EditorPropertyObjectID, EditorProperty);
	Button *edit = nullptr;
	String base_type;
	void _edit_pressed();

protected:
	virtual void _set_read_only(bool p_read_only) override;

public:
	virtual void update_property() override;
	void setup(const String &p_base_type);
	EditorPropertyObjectID();
};

class EditorPropertySignal : public EditorProperty {
	GDCLASS(EditorPropertySignal, EditorProperty);
	Button *edit = nullptr;
	String base_type;
	void _edit_pressed();

public:

Review comment (suggestion):
This should work I think
```suggestion
	void setup(const EditorPropertyRangeHint &p_range_hint);
```

Code after:
	void _menu_pressed(int p_menu);
	void _refresh_names();

protected:
	void _notification(int p_what);
	virtual void _set_read_only(bool p_read_only) override;

public:
	void setup(LayerType p_layer_type);
	void set_layer_name(int p_index, const String &p_name);
	String get_layer_name(int p_index) const;
	virtual void update_property() override;
	EditorPropertyLayers();
};

class EditorPropertyInteger : public EditorProperty {
	GDCLASS(EditorPropertyInteger, EditorProperty);
	EditorSpinSlider *spin = nullptr;
	void _value_changed(int64_t p_val);

protected:
	virtual void _set_read_only(bool p_read_only) override;

public:
	virtual void update_property() override;
	void setup(const EditorPropertyRangeHint &p_range_hint);
	EditorPropertyInteger();
};

class EditorPropertyObjectID : public EditorProperty {
	GDCLASS(EditorPropertyObjectID, EditorProperty);
	Button *edit = nullptr;
	String base_type;
	void _edit_pressed();

protected:
	virtual void _set_read_only(bool p_read_only) override;

public:
	virtual void update_property() override;
	void setup(const String &p_base_type);
	EditorPropertyObjectID();
};

class EditorPropertySignal : public EditorProperty {
	GDCLASS(EditorPropertySignal, EditorProperty);
	Button *edit = nullptr;
	String base_type;
	void _edit_pressed();

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

Code before:
				}
			}
			var = ResourceLoader::load(path);
			KV.value.values[remote_objects->remote_object_ids[0]] = var;
		}

		// Always add the property, since props may have been added or removed.
		remote_objects->prop_list.push_back(pinfo);

		if (!remote_objects->prop_values.has(pinfo.name)) {
			new_props_added++;
		} else if (bool(Variant::evaluate(Variant::OP_NOT_EQUAL, remote_objects->prop_values[pinfo.name], var))) {
			changed.insert(pinfo.name);
		}

		remote_objects->prop_values[pinfo.name] = KV.value.values;
	}

	StringName class_name = objects[0].class_name;
	bool has_custom_class = true;

	if (usage.has("Script")) {
		// Check if all objects have the same script.
		Ref<Script> common_scr;
		for (int i = 0; i < usage["Script"].values.size(); i++) {
			Ref<Script> scr = usage["Script"].values.get_value_at_index(i);
			if (scr.is_null()) {
				has_custom_class = false;
				break;
			}

			if (common_scr.is_null()) {
				common_scr = scr;
			} else if (scr != common_scr) {
				has_custom_class = false;
				break;
			}
		}

		if (has_custom_class) {
			// Now check if the script has a custom class.
			if (common_scr.is_null()) {
				has_custom_class = false;
			} else {
				String scr_class = common_scr->get_global_name();
				if (scr_class == "") {
					has_custom_class = false;
				} else {
					class_name = scr_class;
				}
			}

Review comment (suggestion):
There has to be a better way to iterate value list.
For keys there is `get_key_list()`, for values I guess you could use `values()`.

Code after:
			if (path.contains("::")) {
				// Built-in resource.
				String base_path = path.get_slice("::", 0);
				Ref<Resource> dependency = ResourceLoader::load(base_path);
				if (dependency.is_valid()) {
					remote_dependencies.insert(dependency);
				}
			}
			var = ResourceLoader::load(path);
			KV.value.values[remote_objects->remote_object_ids[0]] = var;
		}

		// Always add the property, since props may have been added or removed.
		remote_objects->prop_list.push_back(pinfo);

		if (!remote_objects->prop_values.has(pinfo.name)) {
			new_props_added++;
		} else if (bool(Variant::evaluate(Variant::OP_NOT_EQUAL, remote_objects->prop_values[pinfo.name], var))) {
			changed.insert(pinfo.name);
		}

		remote_objects->prop_values[pinfo.name] = KV.value.values;
	}

	StringName class_name = objects[0].class_name;
	bool has_custom_class = true;

	if (usage.has("Script")) {
		// Check if all objects have the same script.
		Ref<Script> common_scr;
		LocalVector<Variant> keys = usage["Script"].values.get_key_list();
		for (const Variant &key : keys) {
			Ref<Script> scr = usage["Script"].values[key];
			if (scr.is_null()) {
				has_custom_class = false;
				break;
			}

			if (common_scr.is_null()) {
				common_scr = scr;
			} else if (scr != common_scr) {
				has_custom_class = false;
				break;
			}
		}

		if (has_custom_class) {
			// Now check if the script has a custom class.
			if (common_scr.is_null()) {
				has_custom_class = false;
			} else {
Repository: godotengine/godot
File: editor/debugger/editor_debugger_inspector.cpp (C++)

Code before:

	if (usage.has("Script")) {
		// Check if all objects have the same script.
		Ref<Script> common_scr;
		for (int i = 0; i < usage["Script"].values.size(); i++) {
			Ref<Script> scr = usage["Script"].values.get_value_at_index(i);
			if (scr.is_null()) {
				has_custom_class = false;
				break;
			}

			if (common_scr.is_null()) {
				common_scr = scr;
			} else if (scr != common_scr) {
				has_custom_class = false;
				break;
			}
		}

		if (has_custom_class) {
			// Now check if the script has a custom class.
			if (common_scr.is_null()) {
				has_custom_class = false;
			} else {
				String scr_class = common_scr->get_global_name();
				if (scr_class == "") {
					has_custom_class = false;
				} else {
					class_name = scr_class;
				}
			}
		}
	}

	if (!has_custom_class && class_name != SNAME("Object")) {
		// Search for the common class between all selected objects.
		bool check_type_again = true;
		while (check_type_again) {
			check_type_again = false;

			if (class_name == SNAME("Object") || class_name == StringName()) {
				// All objects inherit from Object, so no need to continue checking.
				class_name = SNAME("Object");
				break;
			}

			// Check that all objects inherit from type_name.
			for (const SceneDebuggerObject &obj : objects) {
				if (obj.class_name == class_name || ClassDB::is_parent_class(obj.class_name, class_name)) {
					continue; // class_name is the same or a parent of the object's class.
				}

Review comment (suggestion):
```suggestion
				const String scr_class = common_scr->get_global_name();
				if (scr_class.is_empty()) {
```

Code after:

		remote_objects->prop_values[pinfo.name] = KV.value.values;
	}

	StringName class_name = objects[0].class_name;
	bool has_custom_class = true;

	if (usage.has("Script")) {
		// Check if all objects have the same script.
		Ref<Script> common_scr;
		LocalVector<Variant> keys = usage["Script"].values.get_key_list();
		for (const Variant &key : keys) {
			Ref<Script> scr = usage["Script"].values[key];
			if (scr.is_null()) {
				has_custom_class = false;
				break;
			}

			if (common_scr.is_null()) {
				common_scr = scr;
			} else if (scr != common_scr) {
				has_custom_class = false;
				break;
			}
		}

		if (has_custom_class) {
			// Now check if the script has a custom class.
			if (common_scr.is_null()) {
				has_custom_class = false;
			} else {
				const StringName scr_class = common_scr->get_global_name();
				if (scr_class.is_empty()) {
					has_custom_class = false;
				} else {
					class_name = scr_class;
				}
			}
		}
	}

	if (!has_custom_class && class_name != SNAME("Object")) {
		// Search for the common class between all selected objects.
		bool check_type_again = true;
		while (check_type_again) {
			check_type_again = false;

			if (class_name.is_empty() || class_name == SNAME("Object")) {
				// All objects inherit from Object, so no need to continue checking.
				class_name = SNAME("Object");
				break;
Repository: godotengine/godot
File: editor/debugger/editor_debugger_inspector.cpp (C++)

Code before:
				break;
			}
		}

		if (has_custom_class) {
			// Now check if the script has a custom class.
			if (common_scr.is_null()) {
				has_custom_class = false;
			} else {
				String scr_class = common_scr->get_global_name();
				if (scr_class == "") {
					has_custom_class = false;
				} else {
					class_name = scr_class;
				}
			}
		}
	}

	if (!has_custom_class && class_name != SNAME("Object")) {
		// Search for the common class between all selected objects.
		bool check_type_again = true;
		while (check_type_again) {
			check_type_again = false;

			if (class_name == SNAME("Object") || class_name == StringName()) {
				// All objects inherit from Object, so no need to continue checking.
				class_name = SNAME("Object");
				break;
			}

			// Check that all objects inherit from type_name.
			for (const SceneDebuggerObject &obj : objects) {
				if (obj.class_name == class_name || ClassDB::is_parent_class(obj.class_name, class_name)) {
					continue; // class_name is the same or a parent of the object's class.
				}

				// class_name is not a parent of the node's class, so check again with the parent class.
				class_name = ClassDB::get_parent_class(class_name);
				check_type_again = true;
				break;
			}
		}
	}
	remote_objects->type_name = class_name;

	if (old_prop_size == remote_objects->prop_list.size() && new_props_added == 0) {
		// Only some may have changed, if so, then update those, if they exist.
		for (const String &E : changed) {
			emit_signal(SNAME("object_property_updated"), remote_objects->get_instance_id(), E);
		}

Review comment (suggestion):
```suggestion
			if (class_name == SNAME("Object") || class_name.is_empty()) {
```

Code after:
				break;
			}

			if (common_scr.is_null()) {
				common_scr = scr;
			} else if (scr != common_scr) {
				has_custom_class = false;
				break;
			}
		}

		if (has_custom_class) {
			// Now check if the script has a custom class.
			if (common_scr.is_null()) {
				has_custom_class = false;
			} else {
				const StringName scr_class = common_scr->get_global_name();
				if (scr_class.is_empty()) {
					has_custom_class = false;
				} else {
					class_name = scr_class;
				}
			}
		}
	}

	if (!has_custom_class && class_name != SNAME("Object")) {
		// Search for the common class between all selected objects.
		bool check_type_again = true;
		while (check_type_again) {
			check_type_again = false;

			if (class_name.is_empty() || class_name == SNAME("Object")) {
				// All objects inherit from Object, so no need to continue checking.
				class_name = SNAME("Object");
				break;
			}

			// Check that all objects inherit from type_name.
			for (const SceneDebuggerObject &obj : objects) {
				if (obj.class_name == class_name || ClassDB::is_parent_class(obj.class_name, class_name)) {
					continue; // class_name is the same or a parent of the object's class.
				}

				// class_name is not a parent of the node's class, so check again with the parent class.
				class_name = ClassDB::get_parent_class(class_name);
				check_type_again = true;
				break;
			}
		}
	}
Repository: godotengine/godot
File: core/os/os.cpp (C++)

Code before:
#include "core/io/dir_access.h"
#include "core/io/file_access.h"
#include "core/io/json.h"
#include "core/os/midi_driver.h"
#include "core/version_generated.gen.h"

#include <cstdarg>

#ifdef MINGW_ENABLED
#define MINGW_STDTHREAD_REDUNDANCY_WARNING
#include "thirdparty/mingw-std-threads/mingw.thread.h"
#define THREADING_NAMESPACE mingw_stdthread
#else
#include <thread>
#define THREADING_NAMESPACE std
#endif

OS *OS::singleton = nullptr;
uint64_t OS::target_ticks = 0;

OS *OS::get_singleton() {
	return singleton;
}

bool OS::prefer_meta_over_ctrl() {
	return singleton->has_feature("macos") || singleton->has_feature("web_macos") || singleton->has_feature("web_ios");
}

uint64_t OS::get_ticks_msec() const {
	return get_ticks_usec() / 1000ULL;
}

double OS::get_unix_time() const {
	return 0;
}

void OS::_set_logger(CompositeLogger *p_logger) {
	if (_logger) {
		memdelete(_logger);
	}
	_logger = p_logger;
}

void OS::add_logger(Logger *p_logger) {
	if (!_logger) {
		Vector<Logger *> loggers;
		loggers.push_back(p_logger);
		_logger = memnew(CompositeLogger(loggers));
	} else {
		_logger->add_logger(p_logger);
	}

Review comment (suggestion):
```suggestion
#if defined(MACOS_ENABLED) || defined(APPLE_EMBEDDED_ENABLED)
	return true;
#elif defined(WEB_ENABLED)
	return singleton->has_feature("web_macos") || singleton->has_feature("web_ios");
#else
	return false;
#endif
```

This should be enabled for iOS as well (when it was originally added, shortcuts were used only for editor, but this is not the case anymore). Also, there is no need to do this check s on non Apple/Web platforms, so it can be ifdef.

Code after:
#include "core/io/dir_access.h"
#include "core/io/file_access.h"
#include "core/io/json.h"
#include "core/os/midi_driver.h"
#include "core/version_generated.gen.h"

#include <cstdarg>

#ifdef MINGW_ENABLED
#define MINGW_STDTHREAD_REDUNDANCY_WARNING
#include "thirdparty/mingw-std-threads/mingw.thread.h"
#define THREADING_NAMESPACE mingw_stdthread
#else
#include <thread>
#define THREADING_NAMESPACE std
#endif

OS *OS::singleton = nullptr;
uint64_t OS::target_ticks = 0;

OS *OS::get_singleton() {
	return singleton;
}

bool OS::prefer_meta_over_ctrl() {
#if defined(MACOS_ENABLED) || defined(APPLE_EMBEDDED_ENABLED)
	return true;
#elif defined(WEB_ENABLED)
	return singleton->has_feature("web_macos") || singleton->has_feature("web_ios");
#else
	return false;
#endif
}

uint64_t OS::get_ticks_msec() const {
	return get_ticks_usec() / 1000ULL;
}

double OS::get_unix_time() const {
	return 0;
}

void OS::_set_logger(CompositeLogger *p_logger) {
	if (_logger) {
		memdelete(_logger);
	}
	_logger = p_logger;
}

void OS::add_logger(Logger *p_logger) {
	if (!_logger) {