From b8b45804485f7ca18f035f1eeb7a1ac0cf591cac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Wed, 16 Feb 2022 13:56:32 +0100 Subject: [PATCH] Style: Cleanup single-line blocks, semicolons, dead code Remove currently unused implementation of TextureBasisU, could be re-added later on if needed and ported. --- core/core_bind.cpp | 2 +- core/input/input.cpp | 1 - core/io/marshalls.cpp | 13 -- core/io/resource_format_binary.cpp | 5 - core/io/resource_loader.cpp | 24 -- core/math/bvh_cull.inc | 3 +- core/math/bvh_debug.inc | 6 +- core/math/octree.h | 10 - core/object/object.cpp | 13 +- core/object/object.h | 45 ++-- core/os/os.cpp | 6 +- core/os/spin_lock.h | 2 +- core/variant/type_info.h | 3 +- drivers/coreaudio/audio_driver_coreaudio.cpp | 26 ++- drivers/gles3/rasterizer_scene_gles3.cpp | 1 + drivers/gles3/rasterizer_storage_gles3.cpp | 12 +- drivers/gles3/shader_gles3.cpp | 1 + drivers/gles3/texture_loader_gles3.cpp | 1 + drivers/png/resource_saver_png.cpp | 4 +- drivers/unix/dir_access_unix.cpp | 12 +- drivers/unix/file_access_unix.cpp | 9 +- drivers/unix/ip_unix.cpp | 29 +-- drivers/unix/net_socket_posix.cpp | 16 +- drivers/unix/os_unix.cpp | 9 +- drivers/unix/syslog_logger.cpp | 2 + drivers/vulkan/rendering_device_vulkan.cpp | 34 +-- drivers/wasapi/audio_driver_wasapi.cpp | 6 +- drivers/windows/file_access_windows.cpp | 7 +- editor/animation_bezier_editor.cpp | 8 - editor/debugger/editor_visual_profiler.cpp | 14 -- editor/editor_data.cpp | 5 - editor/editor_inspector.cpp | 2 - editor/editor_node.cpp | 4 +- editor/import/collada.cpp | 26 --- editor/import/resource_importer_obj.cpp | 2 - editor/import/resource_importer_wav.h | 40 +--- editor/plugins/node_3d_editor_gizmos.cpp | 1 - editor/plugins/polygon_2d_editor_plugin.cpp | 2 +- editor/plugins/shader_editor_plugin.cpp | 8 - modules/basis_universal/register_types.cpp | 2 - modules/basis_universal/texture_basisu.cpp | 218 ------------------ modules/basis_universal/texture_basisu.h | 80 ------- modules/bullet/slider_joint_bullet.cpp | 1 - modules/fbx/fbx_parser/FBXMeshGeometry.cpp | 26 --- modules/mono/csharp_script.h | 3 +- modules/mono/editor/bindings_generator.cpp | 3 +- modules/mono/mono_gd/gd_mono.cpp | 9 +- .../mono/mono_gd/support/android_support.cpp | 89 ++++--- modules/mono/mono_gd/support/ios_support.mm | 3 +- modules/mono/utils/mono_reg_utils.cpp | 38 +-- modules/mono/utils/path_utils.cpp | 9 +- modules/visual_script/visual_script.cpp | 2 - modules/webrtc/webrtc_data_channel_js.cpp | 4 +- modules/websocket/emws_client.cpp | 10 +- modules/websocket/emws_peer.cpp | 6 +- modules/webxr/webxr_interface_js.cpp | 3 +- platform/android/android_input_handler.cpp | 5 +- platform/android/api/jni_singleton.h | 22 +- platform/android/audio_driver_opensl.cpp | 9 +- platform/android/dir_access_jandroid.cpp | 50 ++-- platform/android/file_access_android.cpp | 25 +- .../org/godotengine/godot/utils/GLUtils.java | 5 +- platform/android/java_class_wrapper.cpp | 90 ++++---- platform/android/java_godot_io_wrapper.cpp | 1 + platform/android/java_godot_lib_jni.cpp | 46 ++-- platform/android/java_godot_wrapper.cpp | 12 +- platform/android/jni_utils.cpp | 44 ++-- platform/android/net_socket_android.cpp | 21 +- platform/android/os_android.cpp | 30 ++- platform/iphone/app_delegate.mm | 11 +- platform/iphone/display_layer.mm | 12 +- platform/iphone/display_server_iphone.mm | 23 +- platform/iphone/godot_iphone.mm | 12 +- platform/iphone/godot_view.mm | 6 +- .../iphone/godot_view_gesture_recognizer.mm | 1 + platform/iphone/godot_view_renderer.mm | 3 +- platform/iphone/ios.mm | 5 +- platform/iphone/joypad_iphone.mm | 27 +-- platform/iphone/os_iphone.mm | 12 +- platform/iphone/view_controller.mm | 2 +- .../javascript/display_server_javascript.cpp | 11 +- platform/javascript/javascript_singleton.cpp | 1 + platform/javascript/os_javascript.cpp | 2 +- platform/linuxbsd/display_server_x11.cpp | 2 +- platform/linuxbsd/joypad_linux.cpp | 6 +- platform/linuxbsd/os_linuxbsd.cpp | 2 +- platform/linuxbsd/vulkan_context_x11.cpp | 1 + platform/osx/crash_handler_osx.mm | 9 +- platform/osx/display_server_osx.mm | 3 +- platform/osx/godot_main_osx.mm | 4 +- platform/osx/joypad_osx.cpp | 14 +- platform/osx/os_osx.mm | 2 +- platform/osx/osx_terminal_logger.mm | 5 +- platform/uwp/app_uwp.cpp | 15 +- platform/uwp/context_egl_uwp.cpp | 20 +- platform/uwp/joypad_uwp.cpp | 10 +- platform/uwp/os_uwp.cpp | 66 +++--- platform/windows/crash_handler_windows.cpp | 23 +- platform/windows/display_server_windows.cpp | 89 +++---- platform/windows/gl_manager_windows.cpp | 39 ++-- platform/windows/godot_windows.cpp | 5 +- platform/windows/joypad_windows.cpp | 46 ++-- platform/windows/joypad_windows.h | 3 +- platform/windows/os_windows.cpp | 54 +++-- platform/windows/windows_terminal_logger.cpp | 14 +- scene/2d/polygon_2d.cpp | 9 - scene/3d/camera_3d.cpp | 6 - scene/3d/occluder_instance_3d.cpp | 2 - scene/3d/sprite_3d.cpp | 4 - scene/3d/vehicle_body_3d.cpp | 10 +- scene/animation/animation_player.cpp | 6 - scene/gui/nine_patch_rect.cpp | 4 - scene/gui/scroll_bar.cpp | 5 - scene/gui/tree.cpp | 12 +- scene/gui/video_stream_player.cpp | 42 ++-- scene/resources/packed_scene.cpp | 4 - scene/resources/surface_tool.cpp | 27 ++- .../visual_shader_particle_nodes.cpp | 4 +- servers/audio/effects/audio_effect_delay.cpp | 3 - .../effects/audio_effect_stereo_enhance.cpp | 1 - servers/physics_2d/godot_body_pair_2d.cpp | 5 +- .../godot_collision_solver_2d_sat.cpp | 4 - .../physics_2d/godot_physics_server_2d.cpp | 13 -- servers/physics_2d/godot_shape_2d.cpp | 6 - servers/physics_3d/gjk_epa.cpp | 2 +- .../godot_collision_solver_3d_sat.cpp | 4 - .../physics_3d/godot_physics_server_3d.cpp | 13 -- servers/physics_3d/godot_shape_3d.cpp | 6 - .../joints/godot_hinge_joint_3d.cpp | 6 +- .../renderer_rd/renderer_scene_gi_rd.cpp | 1 - .../shaders/scene_forward_clustered.glsl | 1 - .../shaders/volumetric_fog_process.glsl | 1 - servers/rendering/shader_compiler.cpp | 36 --- servers/rendering/shader_language.cpp | 3 +- servers/rendering_server.cpp | 4 +- tests/core/string/test_string.h | 2 +- tests/servers/test_physics_2d.cpp | 30 +-- 137 files changed, 847 insertions(+), 1269 deletions(-) delete mode 100644 modules/basis_universal/texture_basisu.cpp delete mode 100644 modules/basis_universal/texture_basisu.h diff --git a/core/core_bind.cpp b/core/core_bind.cpp index 810284d5d076..bb4b49d9cd01 100644 --- a/core/core_bind.cpp +++ b/core/core_bind.cpp @@ -2291,8 +2291,8 @@ void Engine::register_singleton(const StringName &p_name, Object *p_object) { s.ptr = p_object; s.user_created = true; ::Engine::get_singleton()->add_singleton(s); - ; } + void Engine::unregister_singleton(const StringName &p_name) { ERR_FAIL_COND_MSG(!has_singleton(p_name), "Attempt to remove unregistered singleton: " + String(p_name)); ERR_FAIL_COND_MSG(!::Engine::get_singleton()->is_singleton_user_created(p_name), "Attempt to remove non-user created singleton: " + String(p_name)); diff --git a/core/input/input.cpp b/core/input/input.cpp index d36d0f4da0c6..656bb92203b4 100644 --- a/core/input/input.cpp +++ b/core/input/input.cpp @@ -1145,7 +1145,6 @@ Input::JoyEvent Input::_get_mapped_axis_event(const JoyDeviceMapping &mapping, J // It doesn't make sense for a full axis to map to a button, // but keeping as a default for a trigger with a positive half-axis. event.value = (shifted_positive_value * 2) - 1; - ; break; } return event; diff --git a/core/io/marshalls.cpp b/core/io/marshalls.cpp index 5c39b2fa1b3b..12de2f582e25 100644 --- a/core/io/marshalls.cpp +++ b/core/io/marshalls.cpp @@ -1417,19 +1417,6 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo d.get_key_list(&keys); for (const Variant &E : keys) { - /* - CharString utf8 = E->->utf8(); - - if (buf) { - encode_uint32(utf8.length()+1,buf); - buf+=4; - memcpy(buf,utf8.get_data(),utf8.length()+1); - } - - r_len+=4+utf8.length()+1; - while (r_len%4) - r_len++; //pad - */ int len; Error err = encode_variant(E, buf, len, p_full_objects, p_depth + 1); ERR_FAIL_COND_V(err, err); diff --git a/core/io/resource_format_binary.cpp b/core/io/resource_format_binary.cpp index ed58b4be7baf..611f37122973 100644 --- a/core/io/resource_format_binary.cpp +++ b/core/io/resource_format_binary.cpp @@ -1607,11 +1607,6 @@ void ResourceFormatSaverBinaryInstance::write_variant(FileAccess *f, const Varia d.get_key_list(&keys); for (const Variant &E : keys) { - /* - if (!_check_type(dict[E])) - continue; - */ - write_variant(f, E, resource_map, external_resources, string_map); write_variant(f, d[E], resource_map, external_resources, string_map); } diff --git a/core/io/resource_loader.cpp b/core/io/resource_loader.cpp index 21bf566b1b3b..2419c76dd3ac 100644 --- a/core/io/resource_loader.cpp +++ b/core/io/resource_loader.cpp @@ -672,10 +672,6 @@ int ResourceLoader::get_import_order(const String &p_path) { if (!loader[i]->recognize_path(local_path)) { continue; } - /* - if (p_type_hint!="" && !loader[i]->handles_type(p_type_hint)) - continue; - */ return loader[i]->get_import_order(p_path); } @@ -690,10 +686,6 @@ String ResourceLoader::get_import_group_file(const String &p_path) { if (!loader[i]->recognize_path(local_path)) { continue; } - /* - if (p_type_hint!="" && !loader[i]->handles_type(p_type_hint)) - continue; - */ return loader[i]->get_import_group_file(p_path); } @@ -708,10 +700,6 @@ bool ResourceLoader::is_import_valid(const String &p_path) { if (!loader[i]->recognize_path(local_path)) { continue; } - /* - if (p_type_hint!="" && !loader[i]->handles_type(p_type_hint)) - continue; - */ return loader[i]->is_import_valid(p_path); } @@ -726,10 +714,6 @@ bool ResourceLoader::is_imported(const String &p_path) { if (!loader[i]->recognize_path(local_path)) { continue; } - /* - if (p_type_hint!="" && !loader[i]->handles_type(p_type_hint)) - continue; - */ return loader[i]->is_imported(p_path); } @@ -744,10 +728,6 @@ void ResourceLoader::get_dependencies(const String &p_path, List *p_depe if (!loader[i]->recognize_path(local_path)) { continue; } - /* - if (p_type_hint!="" && !loader[i]->handles_type(p_type_hint)) - continue; - */ loader[i]->get_dependencies(local_path, p_dependencies, p_add_types); } @@ -760,10 +740,6 @@ Error ResourceLoader::rename_dependencies(const String &p_path, const Maprecognize_path(local_path)) { continue; } - /* - if (p_type_hint!="" && !loader[i]->handles_type(p_type_hint)) - continue; - */ return loader[i]->rename_dependencies(local_path, p_map); } diff --git a/core/math/bvh_cull.inc b/core/math/bvh_cull.inc index d7edc8a88431..ab468bfd29c2 100644 --- a/core/math/bvh_cull.inc +++ b/core/math/bvh_cull.inc @@ -508,8 +508,9 @@ bool _cull_convex_iterative(uint32_t p_node_id, CullParams &r_params, bool p_ful uint32_t child_id = leaf.get_item_ref_id(n); // full up with results? exit early, no point in further testing - if (!_cull_hit(child_id, r_params)) + if (!_cull_hit(child_id, r_params)) { return false; + } } } #endif // BVH_CONVEX_CULL_OPTIMIZED diff --git a/core/math/bvh_debug.inc b/core/math/bvh_debug.inc index 55db794ee350..896c36ecf1a5 100644 --- a/core/math/bvh_debug.inc +++ b/core/math/bvh_debug.inc @@ -1,8 +1,9 @@ public: #ifdef BVH_VERBOSE void _debug_recursive_print_tree(int p_tree_id) const { - if (_root_node_id[p_tree_id] != BVHCommon::INVALID) + if (_root_node_id[p_tree_id] != BVHCommon::INVALID) { _debug_recursive_print_tree_node(_root_node_id[p_tree_id]); + } } String _debug_aabb_to_string(const BVHABB_CLASS &aabb) const { @@ -42,8 +43,9 @@ void _debug_recursive_print_tree_node(uint32_t p_node_id, int depth = 0) const { sz += "["; for (int n = 0; n < leaf.num_items; n++) { - if (n) + if (n) { sz += ", "; + } sz += "r"; sz += itos(leaf.get_item_ref_id(n)); } diff --git a/core/math/octree.h b/core/math/octree.h index 23ba4c1aa3aa..e73f8213b340 100644 --- a/core/math/octree.h +++ b/core/math/octree.h @@ -211,11 +211,6 @@ private: E = pair_map.insert(key, pdata); E->get().eA = p_A->pair_list.push_back(&E->get()); E->get().eB = p_B->pair_list.push_back(&E->get()); - - /* - if (pair_callback) - pair_callback(pair_callback_userdata,p_A->userdata,p_B->userdata); - */ } else { E->get().refcount++; } @@ -854,11 +849,6 @@ void Octree::move(OctreeElementID p_id, const AABB &p_aabb) { Octant *o = F->get().octant; typename List::Element *N = F->next(); - /* - if (!use_pairs) - o->elements.erase( F->get().E ); - */ - if (use_pairs && e.pairable) { o->pairable_elements.erase(F->get().E); } else { diff --git a/core/object/object.cpp b/core/object/object.cpp index f966607e0324..a8a49bd22e9f 100644 --- a/core/object/object.cpp +++ b/core/object/object.cpp @@ -402,13 +402,9 @@ void Object::set(const StringName &p_name, const Variant &p_value, bool *r_valid #endif } - //try built-in setgetter + // Try built-in setter. { if (ClassDB::set_property(this, p_name, p_value, r_valid)) { - /* - if (r_valid) - *r_valid=true; - */ return; } } @@ -421,7 +417,6 @@ void Object::set(const StringName &p_name, const Variant &p_value, bool *r_valid return; } else if (p_name == CoreStringNames::get_singleton()->_meta) { - //set_meta(p_name,p_value); metadata = p_value.duplicate(); if (r_valid) { *r_valid = true; @@ -429,7 +424,7 @@ void Object::set(const StringName &p_name, const Variant &p_value, bool *r_valid return; } - //something inside the object... :| + // Something inside the object... :| bool success = _setv(p_name, p_value); if (success) { if (r_valid) { @@ -485,7 +480,7 @@ Variant Object::get(const StringName &p_name, bool *r_valid) const { #endif } - //try built-in setgetter + // Try built-in getter. { if (ClassDB::get_property(const_cast(this), p_name, ret)) { if (r_valid) { @@ -510,7 +505,7 @@ Variant Object::get(const StringName &p_name, bool *r_valid) const { return ret; } else { - //something inside the object... :| + // Something inside the object... :| bool success = _getv(p_name, ret); if (success) { if (r_valid) { diff --git a/core/object/object.h b/core/object/object.h index be360703bcf3..b5be1cf0e7a5 100644 --- a/core/object/object.h +++ b/core/object/object.h @@ -245,13 +245,7 @@ struct MethodInfo { MethodInfo(const PropertyInfo &p_ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3, const PropertyInfo &p_param4, const PropertyInfo &p_param5); }; -// old cast_to -//if ( is_type(T::get_class_static()) ) -//return static_cast(this); -////else -//return nullptr; - -// API used to extend in GDNative and other C compatible compiled languages +// API used to extend in GDNative and other C compatible compiled languages. class MethodBind; struct ObjectNativeExtension { @@ -297,8 +291,10 @@ struct ObjectNativeExtension { #define GDVIRTUAL_IS_OVERRIDDEN_PTR(m_obj, m_name) m_obj->_gdvirtual_##m_name##_overridden() /* - the following is an incomprehensible blob of hacks and workarounds to compensate for many of the fallencies in C++. As a plus, this macro pretty much alone defines the object model. -*/ + * The following is an incomprehensible blob of hacks and workarounds to + * compensate for many of the fallacies in C++. As a plus, this macro pretty + * much alone defines the object model. + */ #define REVERSE_GET_PROPERTY_LIST \ public: \ @@ -534,7 +530,7 @@ private: Set editor_section_folding; #endif ScriptInstance *script_instance = nullptr; - Variant script; //reference does not yet exist, store it in a + Variant script; // Reference does not exist yet, store it in a Variant. Dictionary metadata; mutable StringName _class_name; mutable const StringName *_class_ptr = nullptr; @@ -583,6 +579,7 @@ protected: } return can_die; } + friend class NativeExtensionMethodBind; _ALWAYS_INLINE_ const ObjectNativeExtension *_get_extension() const { return _extension; } _ALWAYS_INLINE_ GDExtensionClassInstancePtr _get_extension_instance() const { return _extension_instance; } @@ -617,9 +614,6 @@ protected: static void get_valid_parents_static(List *p_parents); static void _get_valid_parents_static(List *p_parents); - //Variant _call_bind(const StringName& p_name, const Variant& p_arg1 = Variant(), const Variant& p_arg2 = Variant(), const Variant& p_arg3 = Variant(), const Variant& p_arg4 = Variant()); - //void _call_deferred_bind(const StringName& p_name, const Variant& p_arg1 = Variant(), const Variant& p_arg2 = Variant(), const Variant& p_arg3 = Variant(), const Variant& p_arg4 = Variant()); - Variant _call_bind(const Variant **p_args, int p_argcount, Callable::CallError &r_error); Variant _call_deferred_bind(const Variant **p_args, int p_argcount, Callable::CallError &r_error); @@ -641,7 +635,7 @@ protected: void _disconnect(const StringName &p_signal, const Callable &p_callable, bool p_force = false); -public: //should be protected, but bug in clang++ +public: // Should be protected, but bug in clang++. static void initialize_class(); _FORCE_INLINE_ static void register_custom_data_to_otdb() {} @@ -729,8 +723,6 @@ public: } /* IAPI */ - //void set(const String& p_name, const Variant& p_value); - //Variant get(const String& p_name) const; void set(const StringName &p_name, const Variant &p_value, bool *r_valid = nullptr); Variant get(const StringName &p_name, bool *r_valid = nullptr) const; @@ -748,7 +740,7 @@ public: void notification(int p_notification, bool p_reversed = false); virtual String to_string(); - //used mainly by script, get and set all INCLUDING string + // Used mainly by script, get and set all INCLUDING string. virtual Variant getvar(const Variant &p_key, bool *r_valid = nullptr) const; virtual void setvar(const Variant &p_key, const Variant &p_value, bool *r_valid = nullptr); @@ -757,8 +749,6 @@ public: void set_script(const Variant &p_script); Variant get_script() const; - /* SCRIPT */ - bool has_meta(const StringName &p_name) const; void set_meta(const StringName &p_name, const Variant &p_value); void remove_meta(const StringName &p_name); @@ -768,13 +758,15 @@ public: #ifdef TOOLS_ENABLED void set_edited(bool p_edited); bool is_edited() const; - uint32_t get_edited_version() const; //this function is used to check when something changed beyond a point, it's used mainly for generating previews + // This function is used to check when something changed beyond a point, it's used mainly for generating previews. + uint32_t get_edited_version() const; #endif void set_script_instance(ScriptInstance *p_instance); _FORCE_INLINE_ ScriptInstance *get_script_instance() const { return script_instance; } - void set_script_and_instance(const Variant &p_script, ScriptInstance *p_instance); //some script languages can't control instance creation, so this function eases the process + // Some script languages can't control instance creation, so this function eases the process. + void set_script_and_instance(const Variant &p_script, ScriptInstance *p_instance); void add_user_signal(const MethodInfo &p_signal); Error emit_signal(const StringName &p_name, VARIANT_ARG_LIST); @@ -803,10 +795,11 @@ public: virtual void get_argument_options(const StringName &p_function, int p_idx, List *r_options) const; - String tr(const StringName &p_message, const StringName &p_context = "") const; // translate message (internationalization) + // Translate message (internationalization). + String tr(const StringName &p_message, const StringName &p_context = "") const; String tr_n(const StringName &p_message, const StringName &p_message_plural, int p_n, const StringName &p_context = "") const; - bool _is_queued_for_deletion = false; // set to true by SceneTree::queue_delete() + bool _is_queued_for_deletion = false; // Set to true by SceneTree::queue_delete(). bool is_queued_for_deletion() const; _FORCE_INLINE_ void set_message_translation(bool p_enable) { _can_translate = p_enable; } @@ -838,14 +831,14 @@ bool predelete_handler(Object *p_object); void postinitialize_handler(Object *p_object); class ObjectDB { -//this needs to add up to 63, 1 bit is for reference +// This needs to add up to 63, 1 bit is for reference. #define OBJECTDB_VALIDATOR_BITS 39 #define OBJECTDB_VALIDATOR_MASK ((uint64_t(1) << OBJECTDB_VALIDATOR_BITS) - 1) #define OBJECTDB_SLOT_MAX_COUNT_BITS 24 #define OBJECTDB_SLOT_MAX_COUNT_MASK ((uint64_t(1) << OBJECTDB_SLOT_MAX_COUNT_BITS) - 1) #define OBJECTDB_REFERENCE_BIT (uint64_t(1) << (OBJECTDB_SLOT_MAX_COUNT_BITS + OBJECTDB_VALIDATOR_BITS)) - struct ObjectSlot { //128 bits per slot + struct ObjectSlot { // 128 bits per slot. uint64_t validator : OBJECTDB_VALIDATOR_BITS; uint64_t next_free : OBJECTDB_SLOT_MAX_COUNT_BITS; uint64_t is_ref_counted : 1; @@ -875,7 +868,7 @@ public: uint64_t id = p_instance_id; uint32_t slot = id & OBJECTDB_SLOT_MAX_COUNT_MASK; - ERR_FAIL_COND_V(slot >= slot_max, nullptr); //this should never happen unless RID is corrupted + ERR_FAIL_COND_V(slot >= slot_max, nullptr); // This should never happen unless RID is corrupted. spin_lock.lock(); diff --git a/core/os/os.cpp b/core/os/os.cpp index 9558a6978ef6..9837b6e0aa7c 100644 --- a/core/os/os.cpp +++ b/core/os/os.cpp @@ -391,16 +391,18 @@ bool OS::has_feature(const String &p_feature) { return true; } #else - if (p_feature == "release") + if (p_feature == "release") { return true; + } #endif #ifdef TOOLS_ENABLED if (p_feature == "editor") { return true; } #else - if (p_feature == "standalone") + if (p_feature == "standalone") { return true; + } #endif if (sizeof(void *) == 8 && p_feature == "64") { diff --git a/core/os/spin_lock.h b/core/os/spin_lock.h index 27d915e0aeff..6e8d7f46d556 100644 --- a/core/os/spin_lock.h +++ b/core/os/spin_lock.h @@ -41,7 +41,7 @@ class SpinLock { public: _ALWAYS_INLINE_ void lock() { while (locked.test_and_set(std::memory_order_acquire)) { - ; + // Continue. } } _ALWAYS_INLINE_ void unlock() { diff --git a/core/variant/type_info.h b/core/variant/type_info.h index 5ae35c92d327..ee050cff4f7c 100644 --- a/core/variant/type_info.h +++ b/core/variant/type_info.h @@ -245,8 +245,9 @@ namespace godot { namespace details { inline String enum_qualified_name_to_class_info_name(const String &p_qualified_name) { Vector parts = p_qualified_name.split("::", false); - if (parts.size() <= 2) + if (parts.size() <= 2) { return String(".").join(parts); + } // Contains namespace. We only want the class and enum names. return parts[parts.size() - 2] + "." + parts[parts.size() - 1]; } diff --git a/drivers/coreaudio/audio_driver_coreaudio.cpp b/drivers/coreaudio/audio_driver_coreaudio.cpp index e37a53fede21..e2b195350fb0 100644 --- a/drivers/coreaudio/audio_driver_coreaudio.cpp +++ b/drivers/coreaudio/audio_driver_coreaudio.cpp @@ -174,9 +174,9 @@ OSStatus AudioDriverCoreAudio::output_callback(void *inRefCon, for (unsigned int i = 0; i < ioData->mNumberBuffers; i++) { AudioBuffer *abuf = &ioData->mBuffers[i]; memset(abuf->mData, 0, abuf->mDataByteSize); - }; + } return 0; - }; + } ad->start_counting_ticks(); @@ -195,14 +195,14 @@ OSStatus AudioDriverCoreAudio::output_callback(void *inRefCon, frames_left -= frames; out += frames * ad->channels; - }; - }; + } + } ad->stop_counting_ticks(); ad->unlock(); return 0; -}; +} OSStatus AudioDriverCoreAudio::input_callback(void *inRefCon, AudioUnitRenderActionFlags *ioActionFlags, @@ -251,7 +251,7 @@ void AudioDriverCoreAudio::start() { active = true; } } -}; +} void AudioDriverCoreAudio::stop() { if (active) { @@ -266,19 +266,19 @@ void AudioDriverCoreAudio::stop() { int AudioDriverCoreAudio::get_mix_rate() const { return mix_rate; -}; +} AudioDriver::SpeakerMode AudioDriverCoreAudio::get_speaker_mode() const { return get_speaker_mode_by_total_channels(channels); -}; +} void AudioDriverCoreAudio::lock() { mutex.lock(); -}; +} void AudioDriverCoreAudio::unlock() { mutex.unlock(); -}; +} bool AudioDriverCoreAudio::try_lock() { return mutex.try_lock() == OK; @@ -521,8 +521,9 @@ Array AudioDriverCoreAudio::_get_device_list(bool capture) { AudioObjectGetPropertyData(audioDevices[i], &prop, 0, nullptr, &size, bufferList); UInt32 channelCount = 0; - for (UInt32 j = 0; j < bufferList->mNumberBuffers; j++) + for (UInt32 j = 0; j < bufferList->mNumberBuffers; j++) { channelCount += bufferList->mBuffers[j].mNumberChannels; + } memfree(bufferList); @@ -579,8 +580,9 @@ void AudioDriverCoreAudio::_set_device(const String &device, bool capture) { AudioObjectGetPropertyData(audioDevices[i], &prop, 0, nullptr, &size, bufferList); UInt32 channelCount = 0; - for (UInt32 j = 0; j < bufferList->mNumberBuffers; j++) + for (UInt32 j = 0; j < bufferList->mNumberBuffers; j++) { channelCount += bufferList->mBuffers[j].mNumberChannels; + } memfree(bufferList); diff --git a/drivers/gles3/rasterizer_scene_gles3.cpp b/drivers/gles3/rasterizer_scene_gles3.cpp index 121dc86fb225..1382573461bb 100644 --- a/drivers/gles3/rasterizer_scene_gles3.cpp +++ b/drivers/gles3/rasterizer_scene_gles3.cpp @@ -29,6 +29,7 @@ /*************************************************************************/ #include "rasterizer_scene_gles3.h" + #ifdef GLES3_ENABLED // TODO: 3D support not implemented yet. diff --git a/drivers/gles3/rasterizer_storage_gles3.cpp b/drivers/gles3/rasterizer_storage_gles3.cpp index a7638b49ec19..abbba13ee643 100644 --- a/drivers/gles3/rasterizer_storage_gles3.cpp +++ b/drivers/gles3/rasterizer_storage_gles3.cpp @@ -29,6 +29,7 @@ /*************************************************************************/ #include "rasterizer_storage_gles3.h" + #ifdef GLES3_ENABLED #include "core/config/project_settings.h" @@ -3716,10 +3717,11 @@ void RasterizerStorageGLES3::canvas_light_occluder_set_polylines(RID p_occluder, co->lines = p_lines; if (p_lines.size() != co->len) { - if (co->index_id) + if (co->index_id) { glDeleteBuffers(1, &co->index_id); - if (co->vertex_id) + } if (co->vertex_id) { glDeleteBuffers(1, &co->vertex_id); + } co->index_id = 0; co->vertex_id = 0; @@ -4014,10 +4016,12 @@ bool RasterizerStorageGLES3::free(RID p_rid) { } else if (canvas_occluder_owner.owns(p_rid)) { CanvasOccluder *co = canvas_occluder_owner.get_or_null(p_rid); - if (co->index_id) + if (co->index_id) { glDeleteBuffers(1, &co->index_id); - if (co->vertex_id) + } + if (co->vertex_id) { glDeleteBuffers(1, &co->vertex_id); + } canvas_occluder_owner.free(p_rid); memdelete(co); diff --git a/drivers/gles3/shader_gles3.cpp b/drivers/gles3/shader_gles3.cpp index 7ae8b4e3bf57..934972262556 100644 --- a/drivers/gles3/shader_gles3.cpp +++ b/drivers/gles3/shader_gles3.cpp @@ -29,6 +29,7 @@ /*************************************************************************/ #include "shader_gles3.h" + #ifdef GLES3_ENABLED #include "core/io/compression.h" diff --git a/drivers/gles3/texture_loader_gles3.cpp b/drivers/gles3/texture_loader_gles3.cpp index 1cbda0212107..f8d4cfdc61c4 100644 --- a/drivers/gles3/texture_loader_gles3.cpp +++ b/drivers/gles3/texture_loader_gles3.cpp @@ -29,6 +29,7 @@ /*************************************************************************/ #include "texture_loader_gles3.h" + #ifdef GLES3_ENABLED #include "core/io/file_access.h" diff --git a/drivers/png/resource_saver_png.cpp b/drivers/png/resource_saver_png.cpp index 77390a5915d7..ca84fb6be940 100644 --- a/drivers/png/resource_saver_png.cpp +++ b/drivers/png/resource_saver_png.cpp @@ -46,7 +46,7 @@ Error ResourceSaverPNG::save(const String &p_path, const RES &p_resource, uint32 Error err = save_image(p_path, img); return err; -}; +} Error ResourceSaverPNG::save_image(const String &p_path, const Ref &p_img) { Vector buffer; @@ -89,4 +89,4 @@ void ResourceSaverPNG::get_recognized_extensions(const RES &p_resource, Listsa_family == AF_INET6) { struct sockaddr_in6 *addr6 = (struct sockaddr_in6 *)p_addr; ip.set_ipv6(addr6->sin6_addr.s6_addr); - }; + } return ip; -}; +} void IPUnix::_resolve_hostname(List &r_addresses, const String &p_hostname, Type p_type) const { struct addrinfo hints; @@ -90,14 +90,14 @@ void IPUnix::_resolve_hostname(List &r_addresses, const String &p_hos } else { hints.ai_family = AF_UNSPEC; hints.ai_flags = AI_ADDRCONFIG; - }; + } hints.ai_flags &= ~AI_NUMERICHOST; int s = getaddrinfo(p_hostname.utf8().get_data(), nullptr, &hints, &result); if (s != 0) { ERR_PRINT("getaddrinfo failed! Cannot resolve hostname."); return; - }; + } if (result == nullptr || result->ai_addr == nullptr) { ERR_PRINT("Invalid response from getaddrinfo"); @@ -105,7 +105,7 @@ void IPUnix::_resolve_hostname(List &r_addresses, const String &p_hos freeaddrinfo(result); } return; - }; + } struct addrinfo *next = result; @@ -138,8 +138,9 @@ void IPUnix::get_local_interfaces(Map *r_interfaces) con for (int i = 0; i < hostnames->Size; i++) { auto hostname = hostnames->GetAt(i); - if (hostname->Type != HostNameType::Ipv4 && hostname->Type != HostNameType::Ipv6) + if (hostname->Type != HostNameType::Ipv4 && hostname->Type != HostNameType::Ipv6) { continue; + } String name = hostname->RawName->Data(); Map::Element *E = r_interfaces->find(name); @@ -171,14 +172,14 @@ void IPUnix::get_local_interfaces(Map *r_interfaces) con nullptr, addrs, &buf_size); if (err == NO_ERROR) { break; - }; + } memfree(addrs); if (err == ERROR_BUFFER_OVERFLOW) { continue; // will go back and alloc the right size - }; + } ERR_FAIL_MSG("Call to GetAdaptersAddresses failed with error " + itos(err) + "."); - }; + } IP_ADAPTER_ADDRESSES *adapter = addrs; @@ -191,19 +192,21 @@ void IPUnix::get_local_interfaces(Map *r_interfaces) con IP_ADAPTER_UNICAST_ADDRESS *address = adapter->FirstUnicastAddress; while (address != nullptr) { int family = address->Address.lpSockaddr->sa_family; - if (family != AF_INET && family != AF_INET6) + if (family != AF_INET && family != AF_INET6) { continue; + } info.ip_addresses.push_front(_sockaddr2ip(address->Address.lpSockaddr)); address = address->Next; } adapter = adapter->Next; // Only add interface if it has at least one IP - if (info.ip_addresses.size() > 0) + if (info.ip_addresses.size() > 0) { r_interfaces->insert(info.name, info); - }; + } + } memfree(addrs); -}; +} #endif diff --git a/drivers/unix/net_socket_posix.cpp b/drivers/unix/net_socket_posix.cpp index bdfd264a0cf1..3130d5cae2ea 100644 --- a/drivers/unix/net_socket_posix.cpp +++ b/drivers/unix/net_socket_posix.cpp @@ -147,7 +147,7 @@ void NetSocketPosix::_set_ip_port(struct sockaddr_storage *p_addr, IPAddress *r_ if (r_port) { *r_port = ntohs(addr6->sin6_port); } - }; + } } NetSocket *NetSocketPosix::_create_func() { @@ -325,8 +325,9 @@ Error NetSocketPosix::open(Type p_sock_type, IP::Type &ip_type) { #if defined(__OpenBSD__) // OpenBSD does not support dual stacking, fallback to IPv4 only. - if (ip_type == IP::TYPE_ANY) + if (ip_type == IP::TYPE_ANY) { ip_type = IP::TYPE_IPV4; + } #endif int family = ip_type == IP::TYPE_IPV4 ? AF_INET : AF_INET6; @@ -420,7 +421,7 @@ Error NetSocketPosix::listen(int p_max_pending) { print_verbose("Failed to listen from socket."); close(); return FAILED; - }; + } return OK; } @@ -494,8 +495,9 @@ Error NetSocketPosix::poll(PollType p_type, int p_timeout) const { return FAILED; } - if (ret == 0) + if (ret == 0) { return ERR_BUSY; + } if (FD_ISSET(_sock, &ex)) { _get_socket_error(); @@ -503,10 +505,12 @@ Error NetSocketPosix::poll(PollType p_type, int p_timeout) const { return FAILED; } - if (rdp && FD_ISSET(_sock, rdp)) + if (rdp && FD_ISSET(_sock, rdp)) { ready = true; - if (wrp && FD_ISSET(_sock, wrp)) + } + if (wrp && FD_ISSET(_sock, wrp)) { ready = true; + } return ready ? OK : ERR_BUSY; #else diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp index 7d5792675757..088525647cbc 100644 --- a/drivers/unix/os_unix.cpp +++ b/drivers/unix/os_unix.cpp @@ -106,7 +106,7 @@ static void _setup_clock() { void OS_Unix::debug_break() { assert(false); -}; +} static void handle_interrupt(int sig) { if (!EngineDebugger::is_active()) { @@ -198,7 +198,7 @@ double OS_Unix::get_unix_time() const { struct timeval tv_now; gettimeofday(&tv_now, nullptr); return (double)tv_now.tv_sec + double(tv_now.tv_usec) / 1000000; -}; +} OS::Date OS_Unix::get_date(bool p_utc) const { time_t t = time(nullptr); @@ -410,7 +410,7 @@ Error OS_Unix::kill(const ProcessID &p_pid) { int OS_Unix::get_process_id() const { return getpid(); -}; +} bool OS_Unix::has_environment(const String &p_var) const { return getenv(p_var.utf8().get_data()) != nullptr; @@ -555,8 +555,9 @@ String OS_Unix::get_executable_path() const { char *resolved_path = new char[buff_size + 1]; - if (_NSGetExecutablePath(resolved_path, &buff_size) == 1) + if (_NSGetExecutablePath(resolved_path, &buff_size) == 1) { WARN_PRINT("MAXPATHLEN is too small"); + } String path(resolved_path); delete[] resolved_path; diff --git a/drivers/unix/syslog_logger.cpp b/drivers/unix/syslog_logger.cpp index 0e1a1a89a3b6..6189d645c621 100644 --- a/drivers/unix/syslog_logger.cpp +++ b/drivers/unix/syslog_logger.cpp @@ -31,7 +31,9 @@ #ifdef UNIX_ENABLED #include "syslog_logger.h" + #include "core/string/print_string.h" + #include void SyslogLogger::logv(const char *p_format, va_list p_list, bool p_err) { diff --git a/drivers/vulkan/rendering_device_vulkan.cpp b/drivers/vulkan/rendering_device_vulkan.cpp index 1d6d9d56e8c4..247961b358c7 100644 --- a/drivers/vulkan/rendering_device_vulkan.cpp +++ b/drivers/vulkan/rendering_device_vulkan.cpp @@ -1200,7 +1200,7 @@ uint32_t RenderingDeviceVulkan::get_image_required_mipmaps(uint32_t p_width, uin d = MAX(1, d >> 1); mipmaps++; - }; + } return mipmaps; } @@ -3679,7 +3679,7 @@ VkRenderPass RenderingDeviceVulkan::_render_pass_create(const Vectorget_device(); - }; break; + } break; case DRIVER_RESOURCE_VULKAN_PHYSICAL_DEVICE: { return (uint64_t)context->get_physical_device(); - }; break; + } break; case DRIVER_RESOURCE_VULKAN_INSTANCE: { return (uint64_t)context->get_instance(); - }; break; + } break; case DRIVER_RESOURCE_VULKAN_QUEUE: { return (uint64_t)context->get_graphics_queue(); - }; break; + } break; case DRIVER_RESOURCE_VULKAN_QUEUE_FAMILY_INDEX: { return context->get_graphics_queue_family_index(); - }; break; + } break; case DRIVER_RESOURCE_VULKAN_IMAGE: { Texture *tex = texture_owner.get_or_null(p_rid); ERR_FAIL_NULL_V(tex, 0); return (uint64_t)tex->image; - }; break; + } break; case DRIVER_RESOURCE_VULKAN_IMAGE_VIEW: { Texture *tex = texture_owner.get_or_null(p_rid); ERR_FAIL_NULL_V(tex, 0); return (uint64_t)tex->view; - }; break; + } break; case DRIVER_RESOURCE_VULKAN_IMAGE_NATIVE_TEXTURE_FORMAT: { Texture *tex = texture_owner.get_or_null(p_rid); ERR_FAIL_NULL_V(tex, 0); return vulkan_formats[tex->format]; - }; break; + } break; case DRIVER_RESOURCE_VULKAN_SAMPLER: { VkSampler *sampler = sampler_owner.get_or_null(p_rid); ERR_FAIL_NULL_V(sampler, 0); return uint64_t(*sampler); - }; break; + } break; case DRIVER_RESOURCE_VULKAN_DESCRIPTOR_SET: { UniformSet *uniform_set = uniform_set_owner.get_or_null(p_rid); ERR_FAIL_NULL_V(uniform_set, 0); return uint64_t(uniform_set->descriptor_set); - }; break; + } break; case DRIVER_RESOURCE_VULKAN_BUFFER: { Buffer *buffer = nullptr; if (vertex_buffer_owner.owns(p_rid)) { @@ -9073,23 +9073,23 @@ uint64_t RenderingDeviceVulkan::get_driver_resource(DriverResource p_resource, R ERR_FAIL_NULL_V(buffer, 0); return uint64_t(buffer->buffer); - }; break; + } break; case DRIVER_RESOURCE_VULKAN_COMPUTE_PIPELINE: { ComputePipeline *compute_pipeline = compute_pipeline_owner.get_or_null(p_rid); ERR_FAIL_NULL_V(compute_pipeline, 0); return uint64_t(compute_pipeline->pipeline); - }; break; + } break; case DRIVER_RESOURCE_VULKAN_RENDER_PIPELINE: { RenderPipeline *render_pipeline = render_pipeline_owner.get_or_null(p_rid); ERR_FAIL_NULL_V(render_pipeline, 0); return uint64_t(render_pipeline->pipeline); - }; break; + } break; default: { // not supported for this driver return 0; - }; break; + } break; } } diff --git a/drivers/wasapi/audio_driver_wasapi.cpp b/drivers/wasapi/audio_driver_wasapi.cpp index c7a2d0443610..c9609b469ad1 100644 --- a/drivers/wasapi/audio_driver_wasapi.cpp +++ b/drivers/wasapi/audio_driver_wasapi.cpp @@ -454,8 +454,9 @@ Error AudioDriverWASAPI::audio_device_init(AudioDeviceWASAPI *p_device, bool p_c Error AudioDriverWASAPI::init_render_device(bool reinit) { Error err = audio_device_init(&audio_output, false, reinit); - if (err != OK) + if (err != OK) { return err; + } switch (audio_output.channels) { case 2: // Stereo @@ -485,8 +486,9 @@ Error AudioDriverWASAPI::init_render_device(bool reinit) { Error AudioDriverWASAPI::init_capture_device(bool reinit) { Error err = audio_device_init(&audio_input, true, reinit); - if (err != OK) + if (err != OK) { return err; + } // Get the max frames UINT32 max_frames; diff --git a/drivers/windows/file_access_windows.cpp b/drivers/windows/file_access_windows.cpp index cfd5d65f6064..59dc1d8e77d7 100644 --- a/drivers/windows/file_access_windows.cpp +++ b/drivers/windows/file_access_windows.cpp @@ -87,7 +87,7 @@ Error FileAccessWindows::_open(const String &p_path, int p_mode_flags) { if (!S_ISREG(st.st_mode)) { return ERR_FILE_CANT_OPEN; } - }; + } #ifdef TOOLS_ENABLED // Windows is case insensitive, but all other platforms are sensitive to it @@ -269,7 +269,7 @@ uint64_t FileAccessWindows::get_buffer(uint8_t *p_dst, uint64_t p_length) const uint64_t read = fread(p_dst, 1, p_length, f); check_errors(); return read; -}; +} Error FileAccessWindows::get_error() const { return last_error; @@ -326,8 +326,9 @@ bool FileAccessWindows::file_exists(const String &p_name) { uint64_t FileAccessWindows::_get_modified_time(const String &p_file) { String file = fix_path(p_file); - if (file.ends_with("/") && file != "/") + if (file.ends_with("/") && file != "/") { file = file.substr(0, file.length() - 1); + } struct _stat st; int rv = _wstat((LPCWSTR)(file.utf16().get_data()), &st); diff --git a/editor/animation_bezier_editor.cpp b/editor/animation_bezier_editor.cpp index 40b5de2ec7b7..cc9c6c26c583 100644 --- a/editor/animation_bezier_editor.cpp +++ b/editor/animation_bezier_editor.cpp @@ -1281,10 +1281,6 @@ void AnimationBezierTrackEdit::gui_input(const Ref &p_event) { // 3-move the keys (re insert them) for (SelectionSet::Element *E = selection.back(); E; E = E->prev()) { float newpos = editor->snap_time(animation->track_get_key_time(E->get().first, E->get().second) + moving_selection_offset.x); - /* - if (newpos<0) - continue; //no add at the beginning - */ Array key = animation->track_get_key_value(E->get().first, E->get().second); float h = key[0]; h += moving_selection_offset.y; @@ -1295,10 +1291,6 @@ void AnimationBezierTrackEdit::gui_input(const Ref &p_event) { // 4-(undo) remove inserted keys for (SelectionSet::Element *E = selection.back(); E; E = E->prev()) { float newpos = editor->snap_time(animation->track_get_key_time(E->get().first, E->get().second) + moving_selection_offset.x); - /* - if (newpos<0) - continue; //no remove what no inserted - */ undo_redo->add_undo_method(animation.ptr(), "track_remove_key_at_time", E->get().first, newpos); } diff --git a/editor/debugger/editor_visual_profiler.cpp b/editor/debugger/editor_visual_profiler.cpp index 3cb5d3513df5..4b821f2a12bd 100644 --- a/editor/debugger/editor_visual_profiler.cpp +++ b/editor/debugger/editor_visual_profiler.cpp @@ -41,7 +41,6 @@ void EditorVisualProfiler::add_frame_metric(const Metric &p_metric) { } frame_metrics.write[last_metric] = p_metric; - // _make_metric_ptrs(frame_metrics.write[last_metric]); List stack; for (int i = 0; i < frame_metrics[last_metric].areas.size(); i++) { @@ -478,19 +477,6 @@ void EditorVisualProfiler::_graph_tex_draw() { graph->draw_string(font, Vector2(font->get_string_size("X", font_size).x, font->get_ascent(font_size) + 2), "CPU:", HORIZONTAL_ALIGNMENT_LEFT, -1, font_size, Color(1, 1, 1, 0.8)); graph->draw_string(font, Vector2(font->get_string_size("X", font_size).x + graph->get_size().width / 2, font->get_ascent(font_size) + 2), "GPU:", HORIZONTAL_ALIGNMENT_LEFT, -1, font_size, Color(1, 1, 1, 0.8)); - - /* - if (hover_metric != -1 && frame_metrics[hover_metric].valid) { - int max_frames = frame_metrics.size(); - int frame = frame_metrics[hover_metric].frame_number - (frame_metrics[last_metric].frame_number - max_frames + 1); - if (frame < 0) - frame = 0; - - int cur_x = frame * graph->get_size().x / max_frames; - - graph->draw_line(Vector2(cur_x, 0), Vector2(cur_x, graph->get_size().y), Color(1, 1, 1, 0.4)); - } -*/ } void EditorVisualProfiler::_graph_tex_mouse_exit() { diff --git a/editor/editor_data.cpp b/editor/editor_data.cpp index 91bd89b201ae..69c7e9d52cdc 100644 --- a/editor/editor_data.cpp +++ b/editor/editor_data.cpp @@ -589,11 +589,6 @@ void EditorData::remove_scene(int p_idx) { } bool EditorData::_find_updated_instances(Node *p_root, Node *p_node, Set &checked_paths) { - /* - if (p_root!=p_node && p_node->get_owner()!=p_root && !p_root->is_editable_instance(p_node->get_owner())) - return false; - */ - Ref ss; if (p_node == p_root) { diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp index d5cd61d7927c..c56ebaa499e5 100644 --- a/editor/editor_inspector.cpp +++ b/editor/editor_inspector.cpp @@ -1858,7 +1858,6 @@ int EditorInspectorArray::_drop_position() const { void EditorInspectorArray::_new_size_line_edit_text_changed(String p_text) { bool valid = false; - ; if (p_text.is_valid_int()) { int val = p_text.to_int(); if (val > 0 && val != count) { @@ -1870,7 +1869,6 @@ void EditorInspectorArray::_new_size_line_edit_text_changed(String p_text) { void EditorInspectorArray::_new_size_line_edit_text_submitted(String p_text) { bool valid = false; - ; if (p_text.is_valid_int()) { int val = p_text.to_int(); if (val > 0 && val != count) { diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 208640a2e3c7..a10eecbca122 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -3916,8 +3916,9 @@ Ref