Merge pull request #97934 from adamscott/give-AThousandShips-a-break

[Codestyle] Set clang-format `RemoveSemicolon` rule to `true`
This commit is contained in:
Thaddeus Crews 2024-10-29 19:25:36 -05:00
commit b7a0971ad2
No known key found for this signature in database
GPG Key ID: 62181B86FE9E5D84
170 changed files with 523 additions and 466 deletions

View File

@ -183,7 +183,7 @@ PackConstructorInitializers: NextLine
# ReflowComments: true
# RemoveBracesLLVM: false
# RemoveParentheses: Leave
# RemoveSemicolon: false
RemoveSemicolon: true
# RequiresClausePosition: OwnLine
# RequiresExpressionIndentation: OuterScope
# SeparateDefinitionBlocks: Leave
@ -231,7 +231,7 @@ SpacesInLineCommentPrefix:
# InEmptyParentheses: false
# Other: false
# SpacesInSquareBrackets: false
Standard: c++17
Standard: c++20
# StatementAttributeLikeMacros:
# - Q_EMIT
# StatementMacros:

View File

@ -57,3 +57,6 @@ df61dc4b2bd54a5a40c515493c76f5a458e5b541
# Style: Apply new `clang-format` fixes
b37fc1014abf7adda70dc30b0822d775b3a4433f
# Set clang-format `RemoveSemicolon` rule to `true`
0d350e71086fffce0553811739aae9f6ad66136c

View File

@ -12,7 +12,7 @@ repos:
rev: v19.1.0
hooks:
- id: clang-format
files: \.(c|h|cpp|hpp|cc|hh|cxx|hxx|m|mm|inc|java|glsl)$
files: \.(c|h|cpp|hpp|cc|hh|cxx|hxx|m|mm|inc|java)$
types_or: [text]
exclude: |
(?x)^(
@ -20,6 +20,17 @@ repos:
platform/android/java/editor/src/main/java/com/android/.*|
platform/android/java/lib/src/com/.*
)
- id: clang-format
name: clang-format-glsl
files: \.(glsl)$
types_or: [text]
exclude: |
(?x)^(
tests/python_build/.*|
platform/android/java/editor/src/main/java/com/android/.*|
platform/android/java/lib/src/com/.*
)
args: ["-style=file:misc/utility/.clang-format-glsl"]
- repo: https://github.com/pocc/pre-commit-hooks
rev: v1.3.5

View File

@ -468,11 +468,11 @@ Error OS::set_thread_name(const String &p_name) {
::Thread::ID OS::get_thread_caller_id() const {
return ::Thread::get_caller_id();
};
}
::Thread::ID OS::get_main_thread_id() const {
return ::Thread::get_main_id();
};
}
bool OS::has_feature(const String &p_feature) const {
const bool *value_ptr = feature_cache.getptr(p_feature);

View File

@ -106,7 +106,7 @@ public:
_FORCE_INLINE_ static EngineDebugger *get_singleton() { return singleton; }
_FORCE_INLINE_ static bool is_active() { return singleton != nullptr && script_debugger != nullptr; }
_FORCE_INLINE_ static ScriptDebugger *get_script_debugger() { return script_debugger; };
_FORCE_INLINE_ static ScriptDebugger *get_script_debugger() { return script_debugger; }
static void initialize(const String &p_uri, bool p_skip_breakpoints, const Vector<String> &p_breakpoints, void (*p_allow_focus_steal_fn)());
static void deinitialize();

View File

@ -96,8 +96,8 @@ public:
virtual bool file_exists(String p_file) = 0;
virtual bool dir_exists(String p_dir) = 0;
virtual bool is_readable(String p_dir) { return true; };
virtual bool is_writable(String p_dir) { return true; };
virtual bool is_readable(String p_dir) { return true; }
virtual bool is_writable(String p_dir) { return true; }
static bool exists(const String &p_dir);
virtual uint64_t get_space_left() = 0;

View File

@ -215,8 +215,8 @@ public:
static bool get_read_only_attribute(const String &p_file);
static Error set_read_only_attribute(const String &p_file, bool p_ro);
static void set_backup_save(bool p_enable) { backup_save = p_enable; };
static bool is_backup_save_enabled() { return backup_save; };
static void set_backup_save(bool p_enable) { backup_save = p_enable; }
static bool is_backup_save_enabled() { return backup_save; }
static String get_md5(const String &p_file);
static String get_sha256(const String &p_file);

View File

@ -51,7 +51,7 @@ struct _IP_ResolverPrivate {
response.clear();
type = IP::TYPE_NONE;
hostname = "";
};
}
QueueItem() {
clear();

View File

@ -222,7 +222,7 @@ public:
static ThreadLoadStatus load_threaded_get_status(const String &p_path, float *r_progress = nullptr);
static Ref<Resource> load_threaded_get(const String &p_path, Error *r_error = nullptr);
static bool is_within_load() { return load_nesting > 0; };
static bool is_within_load() { return load_nesting > 0; }
static void resource_changed_connect(Resource *p_source, const Callable &p_callable, uint32_t p_flags);
static void resource_changed_disconnect(Resource *p_source, const Callable &p_callable);

View File

@ -223,7 +223,7 @@ struct [[nodiscard]] Basis {
static Basis looking_at(const Vector3 &p_target, const Vector3 &p_up = Vector3(0, 1, 0), bool p_use_model_front = false);
Basis(const Quaternion &p_quaternion) { set_quaternion(p_quaternion); };
Basis(const Quaternion &p_quaternion) { set_quaternion(p_quaternion); }
Basis(const Quaternion &p_quaternion, const Vector3 &p_scale) { set_quaternion_scale(p_quaternion, p_scale); }
Basis(const Vector3 &p_axis, real_t p_angle) { set_axis_angle(p_axis, p_angle); }

View File

@ -76,7 +76,7 @@ struct _AtlasWorkRect {
Size2i s;
Point2i p;
int idx = 0;
_FORCE_INLINE_ bool operator<(const _AtlasWorkRect &p_r) const { return s.width > p_r.s.width; };
_FORCE_INLINE_ bool operator<(const _AtlasWorkRect &p_r) const { return s.width > p_r.s.width; }
};
struct _AtlasWorkRectResult {

View File

@ -40,7 +40,7 @@ struct [[nodiscard]] Plane {
real_t d = 0;
void set_normal(const Vector3 &p_normal);
_FORCE_INLINE_ Vector3 get_normal() const { return normal; };
_FORCE_INLINE_ Vector3 get_normal() const { return normal; }
void normalize();
Plane normalized() const;

View File

@ -109,7 +109,7 @@ public:
_FORCE_INLINE_ StringName get_instance_class() const { return instance_class; }
_FORCE_INLINE_ void set_instance_class(const StringName &p_class) { instance_class = p_class; }
_FORCE_INLINE_ int get_argument_count() const { return argument_count; };
_FORCE_INLINE_ int get_argument_count() const { return argument_count; }
#ifdef TOOLS_ENABLED
virtual bool is_valid() const { return true; }

View File

@ -685,22 +685,22 @@ protected:
_ALWAYS_INLINE_ const ObjectGDExtension *_get_extension() const { return _extension; }
_ALWAYS_INLINE_ GDExtensionClassInstancePtr _get_extension_instance() const { return _extension_instance; }
virtual void _initialize_classv() { initialize_class(); }
virtual bool _setv(const StringName &p_name, const Variant &p_property) { return false; };
virtual bool _getv(const StringName &p_name, Variant &r_property) const { return false; };
virtual void _get_property_listv(List<PropertyInfo> *p_list, bool p_reversed) const {};
virtual void _validate_propertyv(PropertyInfo &p_property) const {};
virtual bool _property_can_revertv(const StringName &p_name) const { return false; };
virtual bool _property_get_revertv(const StringName &p_name, Variant &r_property) const { return false; };
virtual bool _setv(const StringName &p_name, const Variant &p_property) { return false; }
virtual bool _getv(const StringName &p_name, Variant &r_property) const { return false; }
virtual void _get_property_listv(List<PropertyInfo> *p_list, bool p_reversed) const {}
virtual void _validate_propertyv(PropertyInfo &p_property) const {}
virtual bool _property_can_revertv(const StringName &p_name) const { return false; }
virtual bool _property_get_revertv(const StringName &p_name, Variant &r_property) const { return false; }
virtual void _notificationv(int p_notification, bool p_reversed) {}
static void _bind_methods();
static void _bind_compatibility_methods() {}
bool _set(const StringName &p_name, const Variant &p_property) { return false; };
bool _get(const StringName &p_name, Variant &r_property) const { return false; };
void _get_property_list(List<PropertyInfo> *p_list) const {};
void _validate_property(PropertyInfo &p_property) const {};
bool _property_can_revert(const StringName &p_name) const { return false; };
bool _property_get_revert(const StringName &p_name, Variant &r_property) const { return false; };
bool _set(const StringName &p_name, const Variant &p_property) { return false; }
bool _get(const StringName &p_name, Variant &r_property) const { return false; }
void _get_property_list(List<PropertyInfo> *p_list) const {}
void _validate_property(PropertyInfo &p_property) const {}
bool _property_can_revert(const StringName &p_name) const { return false; }
bool _property_get_revert(const StringName &p_name, Variant &r_property) const { return false; }
void _notification(int p_notification) {}
_FORCE_INLINE_ static void (*_get_bind_methods())() {

View File

@ -446,8 +446,8 @@ public:
virtual Variant::Type get_property_type(const StringName &p_name, bool *r_is_valid = nullptr) const override;
virtual void validate_property(PropertyInfo &p_property) const override {}
virtual bool property_can_revert(const StringName &p_name) const override { return false; };
virtual bool property_get_revert(const StringName &p_name, Variant &r_ret) const override { return false; };
virtual bool property_can_revert(const StringName &p_name) const override { return false; }
virtual bool property_get_revert(const StringName &p_name, Variant &r_ret) const override { return false; }
virtual void get_method_list(List<MethodInfo> *p_list) const override;
virtual bool has_method(const StringName &p_method) const override;

View File

@ -176,14 +176,14 @@ public:
void set_delta_smoothing(bool p_enabled);
bool is_delta_smoothing_enabled() const;
virtual Vector<String> get_system_fonts() const { return Vector<String>(); };
virtual String get_system_font_path(const String &p_font_name, int p_weight = 400, int p_stretch = 100, bool p_italic = false) const { return String(); };
virtual Vector<String> get_system_font_path_for_text(const String &p_font_name, const String &p_text, const String &p_locale = String(), const String &p_script = String(), int p_weight = 400, int p_stretch = 100, bool p_italic = false) const { return Vector<String>(); };
virtual Vector<String> get_system_fonts() const { return Vector<String>(); }
virtual String get_system_font_path(const String &p_font_name, int p_weight = 400, int p_stretch = 100, bool p_italic = false) const { return String(); }
virtual Vector<String> get_system_font_path_for_text(const String &p_font_name, const String &p_text, const String &p_locale = String(), const String &p_script = String(), int p_weight = 400, int p_stretch = 100, bool p_italic = false) const { return Vector<String>(); }
virtual String get_executable_path() const;
virtual Error execute(const String &p_path, const List<String> &p_arguments, String *r_pipe = nullptr, int *r_exitcode = nullptr, bool read_stderr = false, Mutex *p_pipe_mutex = nullptr, bool p_open_console = false) = 0;
virtual Dictionary execute_with_pipe(const String &p_path, const List<String> &p_arguments, bool p_blocking = true) { return Dictionary(); }
virtual Error create_process(const String &p_path, const List<String> &p_arguments, ProcessID *r_child_id = nullptr, bool p_open_console = false) = 0;
virtual Error create_instance(const List<String> &p_arguments, ProcessID *r_child_id = nullptr) { return create_process(get_executable_path(), p_arguments, r_child_id); };
virtual Error create_instance(const List<String> &p_arguments, ProcessID *r_child_id = nullptr) { return create_process(get_executable_path(), p_arguments, r_child_id); }
virtual Error kill(const ProcessID &p_pid) = 0;
virtual int get_process_id() const;
virtual bool is_process_running(const ProcessID &p_pid) const = 0;

View File

@ -123,7 +123,7 @@ String TranslationDomain::_double_vowels(const String &p_message) const {
}
}
return res;
};
}
String TranslationDomain::_replace_with_accented_string(const String &p_message) const {
String res;

View File

@ -118,7 +118,7 @@ public:
Char16String &operator+=(char16_t p_char);
int length() const { return size() ? size() - 1 : 0; }
const char16_t *get_data() const;
operator const char16_t *() const { return get_data(); };
operator const char16_t *() const { return get_data(); }
protected:
void copy_from(const char16_t *p_cstr);
@ -160,7 +160,7 @@ public:
CharString &operator+=(char p_char);
int length() const { return size() ? size() - 1 : 0; }
const char *get_data() const;
operator const char *() const { return get_data(); };
operator const char *() const { return get_data(); }
protected:
void copy_from(const char *p_cstr);

View File

@ -241,7 +241,7 @@ public:
_FORCE_INLINE_ CowData() {}
_FORCE_INLINE_ ~CowData();
_FORCE_INLINE_ CowData(CowData<T> &p_from) { _ref(p_from); };
_FORCE_INLINE_ CowData(CowData<T> &p_from) { _ref(p_from); }
};
template <typename T>

View File

@ -89,7 +89,7 @@ public:
CRASH_COND(!e);
_list.move_to_front(*e);
return (*e)->get().data;
};
}
const TData *getptr(const TKey &p_key) {
Element *e = _map.getptr(p_key);

View File

@ -76,7 +76,7 @@ public:
}
const T &get() const {
return value;
};
}
Element() {}
};

View File

@ -315,4 +315,6 @@ struct BuildIndexSequence<0, Is...> : IndexSequence<Is...> {};
#define ___gd_is_defined(val) ____gd_is_defined(__GDARG_PLACEHOLDER_##val)
#define GD_IS_DEFINED(x) ___gd_is_defined(x)
#define FORCE_SEMICOLON ;
#endif // TYPEDEFS_H

View File

@ -89,7 +89,7 @@ class AudioDriverCoreAudio : public AudioDriver {
public:
virtual const char *get_name() const override {
return "CoreAudio";
};
}
virtual Error init() override;
virtual void start() override;

View File

@ -6583,7 +6583,7 @@ static Error create_command_signature(ID3D12Device *device, D3D12_INDIRECT_ARGUM
HRESULT res = device->CreateCommandSignature(&cs_desc, nullptr, IID_PPV_ARGS(r_cmd_sig->GetAddressOf()));
ERR_FAIL_COND_V_MSG(!SUCCEEDED(res), ERR_CANT_CREATE, "CreateCommandSignature failed with error " + vformat("0x%08ux", (uint64_t)res) + ".");
return OK;
};
}
Error RenderingDeviceDriverD3D12::_initialize_frames(uint32_t p_frame_count) {
Error err;

View File

@ -110,7 +110,7 @@ public:
PFNEGLIMAGETARGETTEXTURE2DOESPROC eglEGLImageTargetTexture2DOES = nullptr;
#endif
static Config *get_singleton() { return singleton; };
static Config *get_singleton() { return singleton; }
Config();
~Config();

View File

@ -306,8 +306,8 @@ public:
/* Light API */
Light *get_light(RID p_rid) { return light_owner.get_or_null(p_rid); };
bool owns_light(RID p_rid) { return light_owner.owns(p_rid); };
Light *get_light(RID p_rid) { return light_owner.get_or_null(p_rid); }
bool owns_light(RID p_rid) { return light_owner.owns(p_rid); }
void _light_initialize(RID p_rid, RS::LightType p_type);
@ -434,8 +434,8 @@ public:
/* LIGHT INSTANCE API */
LightInstance *get_light_instance(RID p_rid) { return light_instance_owner.get_or_null(p_rid); };
bool owns_light_instance(RID p_rid) { return light_instance_owner.owns(p_rid); };
LightInstance *get_light_instance(RID p_rid) { return light_instance_owner.get_or_null(p_rid); }
bool owns_light_instance(RID p_rid) { return light_instance_owner.owns(p_rid); }
virtual RID light_instance_create(RID p_light) override;
virtual void light_instance_free(RID p_light_instance) override;
@ -633,8 +633,8 @@ public:
/* PROBE API */
ReflectionProbe *get_reflection_probe(RID p_rid) { return reflection_probe_owner.get_or_null(p_rid); };
bool owns_reflection_probe(RID p_rid) { return reflection_probe_owner.owns(p_rid); };
ReflectionProbe *get_reflection_probe(RID p_rid) { return reflection_probe_owner.get_or_null(p_rid); }
bool owns_reflection_probe(RID p_rid) { return reflection_probe_owner.owns(p_rid); }
virtual RID reflection_probe_allocate() override;
virtual void reflection_probe_initialize(RID p_rid) override;
@ -715,8 +715,8 @@ public:
/* LIGHTMAP CAPTURE */
Lightmap *get_lightmap(RID p_rid) { return lightmap_owner.get_or_null(p_rid); };
bool owns_lightmap(RID p_rid) { return lightmap_owner.owns(p_rid); };
Lightmap *get_lightmap(RID p_rid) { return lightmap_owner.get_or_null(p_rid); }
bool owns_lightmap(RID p_rid) { return lightmap_owner.owns(p_rid); }
virtual RID lightmap_allocate() override;
virtual void lightmap_initialize(RID p_rid) override;
@ -739,15 +739,15 @@ public:
/* LIGHTMAP INSTANCE */
LightmapInstance *get_lightmap_instance(RID p_rid) { return lightmap_instance_owner.get_or_null(p_rid); };
bool owns_lightmap_instance(RID p_rid) { return lightmap_instance_owner.owns(p_rid); };
LightmapInstance *get_lightmap_instance(RID p_rid) { return lightmap_instance_owner.get_or_null(p_rid); }
bool owns_lightmap_instance(RID p_rid) { return lightmap_instance_owner.owns(p_rid); }
virtual RID lightmap_instance_create(RID p_lightmap) override;
virtual void lightmap_instance_free(RID p_lightmap) override;
virtual void lightmap_instance_set_transform(RID p_lightmap, const Transform3D &p_transform) override;
/* SHADOW ATLAS API */
bool owns_shadow_atlas(RID p_rid) { return shadow_atlas_owner.owns(p_rid); };
bool owns_shadow_atlas(RID p_rid) { return shadow_atlas_owner.owns(p_rid); }
virtual RID shadow_atlas_create() override;
virtual void shadow_atlas_free(RID p_atlas) override;

View File

@ -576,8 +576,8 @@ public:
/* SHADER API */
Shader *get_shader(RID p_rid) { return shader_owner.get_or_null(p_rid); };
bool owns_shader(RID p_rid) { return shader_owner.owns(p_rid); };
Shader *get_shader(RID p_rid) { return shader_owner.get_or_null(p_rid); }
bool owns_shader(RID p_rid) { return shader_owner.owns(p_rid); }
void _shader_make_dirty(Shader *p_shader);
@ -598,8 +598,8 @@ public:
/* MATERIAL API */
Material *get_material(RID p_rid) { return material_owner.get_or_null(p_rid); };
bool owns_material(RID p_rid) { return material_owner.owns(p_rid); };
Material *get_material(RID p_rid) { return material_owner.get_or_null(p_rid); }
bool owns_material(RID p_rid) { return material_owner.owns(p_rid); }
void _material_queue_update(Material *material, bool p_uniform, bool p_texture);
void _update_queued_materials();

View File

@ -280,8 +280,8 @@ public:
/* MESH API */
Mesh *get_mesh(RID p_rid) { return mesh_owner.get_or_null(p_rid); };
bool owns_mesh(RID p_rid) { return mesh_owner.owns(p_rid); };
Mesh *get_mesh(RID p_rid) { return mesh_owner.get_or_null(p_rid); }
bool owns_mesh(RID p_rid) { return mesh_owner.owns(p_rid); }
virtual RID mesh_allocate() override;
virtual void mesh_initialize(RID p_rid) override;
@ -443,8 +443,8 @@ public:
/* MESH INSTANCE API */
MeshInstance *get_mesh_instance(RID p_rid) { return mesh_instance_owner.get_or_null(p_rid); };
bool owns_mesh_instance(RID p_rid) { return mesh_instance_owner.owns(p_rid); };
MeshInstance *get_mesh_instance(RID p_rid) { return mesh_instance_owner.get_or_null(p_rid); }
bool owns_mesh_instance(RID p_rid) { return mesh_instance_owner.owns(p_rid); }
virtual RID mesh_instance_create(RID p_base) override;
virtual void mesh_instance_free(RID p_rid) override;
@ -492,8 +492,8 @@ public:
/* MULTIMESH API */
MultiMesh *get_multimesh(RID p_rid) { return multimesh_owner.get_or_null(p_rid); };
bool owns_multimesh(RID p_rid) { return multimesh_owner.owns(p_rid); };
MultiMesh *get_multimesh(RID p_rid) { return multimesh_owner.get_or_null(p_rid); }
bool owns_multimesh(RID p_rid) { return multimesh_owner.owns(p_rid); }
virtual RID _multimesh_allocate() override;
virtual void _multimesh_initialize(RID p_rid) override;
@ -571,8 +571,8 @@ public:
/* SKELETON API */
Skeleton *get_skeleton(RID p_rid) { return skeleton_owner.get_or_null(p_rid); };
bool owns_skeleton(RID p_rid) { return skeleton_owner.owns(p_rid); };
Skeleton *get_skeleton(RID p_rid) { return skeleton_owner.get_or_null(p_rid); }
bool owns_skeleton(RID p_rid) { return skeleton_owner.owns(p_rid); }
virtual RID skeleton_allocate() override;
virtual void skeleton_initialize(RID p_rid) override;

View File

@ -2452,7 +2452,7 @@ Point2i TextureStorage::render_target_get_position(RID p_render_target) const {
ERR_FAIL_NULL_V(rt, Point2i());
return rt->position;
};
}
void TextureStorage::render_target_set_size(RID p_render_target, int p_width, int p_height, uint32_t p_view_count) {
RenderTarget *rt = render_target_owner.get_or_null(p_render_target);

View File

@ -478,8 +478,8 @@ public:
/* Canvas Texture API */
CanvasTexture *get_canvas_texture(RID p_rid) { return canvas_texture_owner.get_or_null(p_rid); };
bool owns_canvas_texture(RID p_rid) { return canvas_texture_owner.owns(p_rid); };
CanvasTexture *get_canvas_texture(RID p_rid) { return canvas_texture_owner.get_or_null(p_rid); }
bool owns_canvas_texture(RID p_rid) { return canvas_texture_owner.owns(p_rid); }
virtual RID canvas_texture_allocate() override;
virtual void canvas_texture_initialize(RID p_rid) override;
@ -499,8 +499,8 @@ public:
return texture_owner.get_or_null(texture->proxy_to);
}
return texture;
};
bool owns_texture(RID p_rid) { return texture_owner.owns(p_rid); };
}
bool owns_texture(RID p_rid) { return texture_owner.owns(p_rid); }
void texture_2d_initialize_from_texture(RID p_texture, Texture &p_tex) {
texture_owner.initialize_rid(p_texture, p_tex);
@ -618,8 +618,8 @@ public:
static GLuint system_fbo;
RenderTarget *get_render_target(RID p_rid) { return render_target_owner.get_or_null(p_rid); };
bool owns_render_target(RID p_rid) { return render_target_owner.owns(p_rid); };
RenderTarget *get_render_target(RID p_rid) { return render_target_owner.get_or_null(p_rid); }
bool owns_render_target(RID p_rid) { return render_target_owner.owns(p_rid); }
void check_backbuffer(RenderTarget *rt, const bool uses_screen_texture, const bool uses_depth_texture);

View File

@ -165,8 +165,8 @@ public:
/* VISIBILITY NOTIFIER */
VisibilityNotifier *get_visibility_notifier(RID p_rid) { return visibility_notifier_owner.get_or_null(p_rid); };
bool owns_visibility_notifier(RID p_rid) const { return visibility_notifier_owner.owns(p_rid); };
VisibilityNotifier *get_visibility_notifier(RID p_rid) { return visibility_notifier_owner.get_or_null(p_rid); }
bool owns_visibility_notifier(RID p_rid) const { return visibility_notifier_owner.owns(p_rid); }
virtual RID visibility_notifier_allocate() override;
virtual void visibility_notifier_initialize(RID p_notifier) override;

View File

@ -841,7 +841,7 @@ public:
if (!enabled)
return;
[p_enc setStencilFrontReferenceValue:front_reference backReferenceValue:back_reference];
};
}
} stencil;
struct {
@ -855,7 +855,7 @@ public:
//if (!enabled)
// return;
[p_enc setBlendColorRed:r green:g blue:b alpha:a];
};
}
} blend;
_FORCE_INLINE_ void apply(id<MTLRenderCommandEncoder> __unsafe_unretained p_enc) const {

View File

@ -410,7 +410,7 @@ public:
virtual uint64_t api_trait_get(ApiTrait p_trait) override final;
virtual bool has_feature(Features p_feature) override final;
virtual const MultiviewCapabilities &get_multiview_capabilities() override final;
virtual String get_api_name() const override final { return "Metal"; };
virtual String get_api_name() const override final { return "Metal"; }
virtual String get_api_version() const override final;
virtual String get_pipeline_cache_uuid() const override final;
virtual const Capabilities &get_capabilities() const override final;

View File

@ -100,7 +100,7 @@ class AudioDriverPulseAudio : public AudioDriver {
public:
virtual const char *get_name() const override {
return "PulseAudio";
};
}
virtual Error init() override;
virtual void start() override;

View File

@ -85,7 +85,7 @@ public:
_In_ const WAVEFORMATEX *pFormat,
/* [annotation][in] */
_In_opt_ LPCGUID AudioSessionGuid) = 0;
};
}
__CRT_UUID_DECL(IAudioClient3, 0x7ED4EE07, 0x8E67, 0x4CD4, 0x8C, 0x1A, 0x2B, 0x7A, 0x59, 0x87, 0xAD, 0x42)
#endif // __IAudioClient3_INTERFACE_DEFINED__

View File

@ -716,7 +716,7 @@ class AnimationTrackEditor : public VBoxContainer {
struct SelectedKey {
int track = 0;
int key = 0;
bool operator<(const SelectedKey &p_key) const { return track == p_key.track ? key < p_key.key : track < p_key.track; };
bool operator<(const SelectedKey &p_key) const { return track == p_key.track ? key < p_key.key : track < p_key.track; }
};
struct KeyInfo {

View File

@ -48,7 +48,7 @@ public:
List<PropertyInfo> prop_list;
HashMap<StringName, Variant> prop_values;
ObjectID get_remote_object_id() { return remote_object_id; };
ObjectID get_remote_object_id() { return remote_object_id; }
String get_title();
Variant get_variant(const StringName &p_name);

View File

@ -932,7 +932,7 @@ public:
void dim_editor(bool p_dimming);
bool is_editor_dimmed() const;
void edit_current() { _edit_current(); };
void edit_current() { _edit_current(); }
bool has_scenes_in_session();

View File

@ -2638,7 +2638,7 @@ EditorPropertyColor::EditorPropertyColor() {
void EditorPropertyNodePath::_set_read_only(bool p_read_only) {
assign->set_disabled(p_read_only);
menu->set_disabled(p_read_only);
};
}
Variant EditorPropertyNodePath::_get_cache_value(const StringName &p_prop, bool &r_valid) const {
if (p_prop == get_edited_property()) {

View File

@ -166,7 +166,7 @@ public:
virtual int get_size() const override;
virtual uint32_t get_index_type() const override { return 0x00000002; };
virtual uint32_t get_index_type() const override { return 0x00000002; }
virtual void write_to_file(Ref<FileAccess> p_file) const override;
};
@ -188,7 +188,7 @@ public:
virtual int get_size() const override;
virtual uint32_t get_index_type() const override { return 0x00000005; };
virtual uint32_t get_index_type() const override { return 0x00000005; }
virtual void write_to_file(Ref<FileAccess> p_file) const override;
};
@ -210,7 +210,7 @@ public:
virtual int get_size() const override;
virtual uint32_t get_index_type() const override { return 0x00000007; };
virtual uint32_t get_index_type() const override { return 0x00000007; }
virtual void write_to_file(Ref<FileAccess> p_file) const override;
};
@ -311,7 +311,7 @@ public:
virtual PackedByteArray get_hash_sha256() const override;
virtual int get_size() const override;
virtual uint32_t get_index_type() const override { return 0x00000000; };
virtual uint32_t get_index_type() const override { return 0x00000000; }
virtual void write_to_file(Ref<FileAccess> p_file) const override;
};
@ -330,7 +330,7 @@ public:
virtual PackedByteArray get_hash_sha256() const override;
virtual int get_size() const override;
virtual uint32_t get_index_type() const override { return 0x00010000; };
virtual uint32_t get_index_type() const override { return 0x00010000; }
virtual void write_to_file(Ref<FileAccess> p_file) const override;
};

View File

@ -216,7 +216,7 @@ public:
Ref<EditorExportPreset> get_current_preset() const;
bool is_exporting() const { return exporting; };
bool is_exporting() const { return exporting; }
ProjectExportDialog();
~ProjectExportDialog();

View File

@ -402,7 +402,7 @@ public:
FileSortOption get_file_sort() const { return file_sort; }
void set_file_list_display_mode(FileListDisplayMode p_mode);
FileListDisplayMode get_file_list_display_mode() const { return file_list_display_mode; };
FileListDisplayMode get_file_list_display_mode() const { return file_list_display_mode; }
Tree *get_tree_control() { return tree; }

View File

@ -350,7 +350,7 @@ void EditorFileDialog::shortcut_input(const Ref<InputEvent> &p_event) {
void EditorFileDialog::set_enable_multiple_selection(bool p_enable) {
item_list->set_select_mode(p_enable ? ItemList::SELECT_MULTI : ItemList::SELECT_SINGLE);
};
}
Vector<String> EditorFileDialog::get_selected_files() const {
Vector<String> list;
@ -360,7 +360,7 @@ Vector<String> EditorFileDialog::get_selected_files() const {
}
}
return list;
};
}
void EditorFileDialog::update_dir() {
if (drives->is_visible()) {

View File

@ -566,7 +566,7 @@ EditorToaster::EditorToaster() {
eh.errfunc = _error_handler;
add_error_handler(&eh);
};
}
EditorToaster::~EditorToaster() {
singleton = nullptr;

View File

@ -359,7 +359,7 @@ public:
for (int i = 0; i < children.size(); i++) {
memdelete(children[i]);
}
};
}
};
struct NodeSkeleton : public Node {

View File

@ -113,7 +113,7 @@ class InspectorDock : public VBoxContainer {
void _new_resource();
void _load_resource(const String &p_type = "");
void _open_resource_selector() { _load_resource(); }; // just used to call from arg-less signal
void _open_resource_selector() { _load_resource(); } // just used to call from arg-less signal
void _resource_file_selected(const String &p_file);
void _save_resource(bool save_as);
void _unref_resource();

View File

@ -1397,7 +1397,7 @@ void AnimationPlayerEditor::_seek_value_changed(float p_value, bool p_timeline_o
}
track_editor->set_anim_pos(pos);
};
}
void AnimationPlayerEditor::_animation_player_changed(Object *p_pl) {
_update_player();

View File

@ -157,7 +157,7 @@ ControlPositioningWarning::ControlPositioningWarning() {
void EditorPropertyAnchorsPreset::_set_read_only(bool p_read_only) {
options->set_disabled(p_read_only);
};
}
void EditorPropertyAnchorsPreset::_option_selected(int p_which) {
int64_t val = options->get_item_metadata(p_which);
@ -221,7 +221,7 @@ void EditorPropertySizeFlags::_set_read_only(bool p_read_only) {
check->set_disabled(p_read_only);
}
flag_presets->set_disabled(p_read_only);
};
}
void EditorPropertySizeFlags::_preset_selected(int p_which) {
int preset = flag_presets->get_item_id(p_which);

View File

@ -241,7 +241,7 @@ protected:
static ControlEditorToolbar *singleton;
public:
bool is_anchors_mode_enabled() { return anchors_mode; };
bool is_anchors_mode_enabled() { return anchors_mode; }
static ControlEditorToolbar *get_singleton() { return singleton; }

View File

@ -168,7 +168,7 @@ protected:
virtual Vector2 _get_offset(int p_idx) const override;
virtual bool _has_uv() const override { return true; };
virtual bool _has_uv() const override { return true; }
virtual void _commit_action() override;
void _notification(int p_what);

View File

@ -351,12 +351,12 @@ void Skeleton3DEditor::set_keyable(const bool p_keyable) {
} else {
animation_hb->hide();
}
};
}
void Skeleton3DEditor::set_bone_options_enabled(const bool p_bone_options_enabled) {
skeleton_options->get_popup()->set_item_disabled(SKELETON_OPTION_RESET_SELECTED_POSES, !p_bone_options_enabled);
skeleton_options->get_popup()->set_item_disabled(SKELETON_OPTION_SELECTED_POSES_TO_RESTS, !p_bone_options_enabled);
};
}
void Skeleton3DEditor::_bind_methods() {
ClassDB::bind_method(D_METHOD("update_all"), &Skeleton3DEditor::update_all);

View File

@ -228,14 +228,14 @@ public:
void move_skeleton_bone(NodePath p_skeleton_path, int32_t p_selected_boneidx, int32_t p_target_boneidx);
Skeleton3D *get_skeleton() const { return skeleton; };
Skeleton3D *get_skeleton() const { return skeleton; }
bool is_edit_mode() const { return edit_mode; }
void update_bone_original();
Vector3 get_bone_original_position() const { return bone_original_position; };
Quaternion get_bone_original_rotation() const { return bone_original_rotation; };
Vector3 get_bone_original_scale() const { return bone_original_scale; };
Vector3 get_bone_original_position() const { return bone_original_position; }
Quaternion get_bone_original_rotation() const { return bone_original_rotation; }
Vector3 get_bone_original_scale() const { return bone_original_scale; }
Skeleton3DEditor(EditorInspectorPluginSkeleton *e_plugin, Skeleton3D *skeleton);
~Skeleton3DEditor();

View File

@ -496,13 +496,13 @@ void TileAtlasView::set_atlas_source(TileSet *p_tile_set, TileSetAtlasSource *p_
float TileAtlasView::get_zoom() const {
return zoom_widget->get_zoom();
};
}
void TileAtlasView::set_transform(float p_zoom, Vector2i p_panning) {
zoom_widget->set_zoom(p_zoom);
panning = p_panning;
_update_zoom_and_panning();
};
}
void TileAtlasView::set_padding(Side p_side, int p_padding) {
ERR_FAIL_COND(p_padding < 0);

View File

@ -135,8 +135,8 @@ public:
void set_padding(Side p_side, int p_padding);
// Left side.
void set_texture_grid_visible(bool p_visible) { base_tiles_texture_grid->set_visible(p_visible); };
void set_tile_shape_grid_visible(bool p_visible) { base_tiles_shape_grid->set_visible(p_visible); };
void set_texture_grid_visible(bool p_visible) { base_tiles_texture_grid->set_visible(p_visible); }
void set_tile_shape_grid_visible(bool p_visible) { base_tiles_shape_grid->set_visible(p_visible); }
Vector2i get_atlas_tile_coords_at_pos(const Vector2 p_pos, bool p_clamp = false) const;
@ -148,7 +148,7 @@ public:
}
p_control->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
p_control->set_mouse_filter(Control::MOUSE_FILTER_PASS);
};
}
// Right side.
Vector3i get_alternative_tile_at_pos(const Vector2 p_pos) const;
@ -162,7 +162,7 @@ public:
}
p_control->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
p_control->set_mouse_filter(Control::MOUSE_FILTER_PASS);
};
}
// Redraw everything.
void queue_redraw();

View File

@ -1100,11 +1100,10 @@ void TileDataDefaultEditor::forward_draw_over_atlas(TileAtlasView *p_tile_atlas_
}
p_canvas_item->draw_set_transform_matrix(Transform2D());
}
};
}
void TileDataDefaultEditor::forward_draw_over_alternatives(TileAtlasView *p_tile_atlas_view, TileSetAtlasSource *p_tile_set_atlas_source, CanvasItem *p_canvas_item, Transform2D p_transform) {
};
}
void TileDataDefaultEditor::forward_painting_atlas_gui_input(TileAtlasView *p_tile_atlas_view, TileSetAtlasSource *p_tile_set_atlas_source, const Ref<InputEvent> &p_event) {
Ref<InputEventMouseMotion> mm = p_event;

View File

@ -62,7 +62,7 @@ public:
void set_tile_set(Ref<TileSet> p_tile_set);
// Input to handle painting.
virtual Control *get_toolbar() { return nullptr; };
virtual Control *get_toolbar() { return nullptr; }
virtual void forward_draw_over_atlas(TileAtlasView *p_tile_atlas_view, TileSetAtlasSource *p_tile_atlas_source, CanvasItem *p_canvas_item, Transform2D p_transform) {}
virtual void forward_draw_over_alternatives(TileAtlasView *p_tile_atlas_view, TileSetAtlasSource *p_tile_atlas_source, CanvasItem *p_canvas_item, Transform2D p_transform) {}
virtual void forward_painting_atlas_gui_input(TileAtlasView *p_tile_atlas_view, TileSetAtlasSource *p_tile_atlas_source, const Ref<InputEvent> &p_event) {}
@ -238,7 +238,7 @@ protected:
virtual void _setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, const HashMap<TileMapCell, Variant, TileMapCell> &p_previous_values, const Variant &p_new_value);
public:
virtual Control *get_toolbar() override { return toolbar; };
virtual Control *get_toolbar() override { return toolbar; }
virtual void forward_draw_over_atlas(TileAtlasView *p_tile_atlas_view, TileSetAtlasSource *p_tile_atlas_source, CanvasItem *p_canvas_item, Transform2D p_transform) override;
virtual void forward_draw_over_alternatives(TileAtlasView *p_tile_atlas_view, TileSetAtlasSource *p_tile_atlas_source, CanvasItem *p_canvas_item, Transform2D p_transform) override;
virtual void forward_painting_atlas_gui_input(TileAtlasView *p_tile_atlas_view, TileSetAtlasSource *p_tile_atlas_source, const Ref<InputEvent> &p_event) override;
@ -375,7 +375,7 @@ protected:
void _notification(int p_what);
public:
virtual Control *get_toolbar() override { return toolbar; };
virtual Control *get_toolbar() override { return toolbar; }
virtual void forward_draw_over_atlas(TileAtlasView *p_tile_atlas_view, TileSetAtlasSource *p_tile_atlas_source, CanvasItem *p_canvas_item, Transform2D p_transform) override;
virtual void forward_draw_over_alternatives(TileAtlasView *p_tile_atlas_view, TileSetAtlasSource *p_tile_atlas_source, CanvasItem *p_canvas_item, Transform2D p_transform) override;
virtual void forward_painting_atlas_gui_input(TileAtlasView *p_tile_atlas_view, TileSetAtlasSource *p_tile_atlas_source, const Ref<InputEvent> &p_event) override;

View File

@ -63,9 +63,9 @@ public:
virtual Vector<TabData> get_tabs() const {
return Vector<TabData>();
};
}
virtual bool forward_canvas_gui_input(const Ref<InputEvent> &p_event) { return false; };
virtual bool forward_canvas_gui_input(const Ref<InputEvent> &p_event) { return false; }
virtual void forward_canvas_draw_over_viewport(Control *p_overlay) {}
virtual void tile_set_changed() {}
virtual void edit(ObjectID p_tile_map_layer_id) {}

View File

@ -80,7 +80,7 @@ public:
int get_id() const;
void edit(Ref<TileSet> p_tile_set, Ref<TileSetAtlasSource> p_tile_set_atlas_source, int p_source_id);
Ref<TileSetAtlasSource> get_edited() { return tile_set_atlas_source; };
Ref<TileSetAtlasSource> get_edited() { return tile_set_atlas_source; }
};
// -- Proxy object for a tile, needed by the inspector --
@ -101,8 +101,8 @@ public:
static void _bind_methods();
public:
Ref<TileSetAtlasSource> get_edited_tile_set_atlas_source() const { return tile_set_atlas_source; };
RBSet<TileSelection> get_edited_tiles() const { return tiles; };
Ref<TileSetAtlasSource> get_edited_tile_set_atlas_source() const { return tile_set_atlas_source; }
RBSet<TileSelection> get_edited_tiles() const { return tiles; }
// Update the proxyed object.
void edit(Ref<TileSetAtlasSource> p_tile_set_atlas_source, const RBSet<TileSelection> &p_tiles = RBSet<TileSelection>());

View File

@ -1270,7 +1270,7 @@ bool ProjectConverter3To4::test_single_array(const char *p_array[][2], bool p_ig
}
}
return valid;
};
}
// Returns arguments from given function execution, this cannot be really done as regex.
// `abc(d,e(f,g),h)` -> [d], [e(f,g)], [h]
@ -1469,7 +1469,7 @@ void ProjectConverter3To4::rename_colors(Vector<SourceLine> &source_lines, const
}
}
}
};
}
// Convert hexadecimal colors from ARGB to RGBA
void ProjectConverter3To4::convert_hexadecimal_colors(Vector<SourceLine> &source_lines, const RegExContainer &reg_container) {
@ -1566,7 +1566,7 @@ void ProjectConverter3To4::rename_classes(Vector<SourceLine> &source_lines, cons
}
}
}
};
}
Vector<String> ProjectConverter3To4::check_for_rename_classes(Vector<String> &lines, const RegExContainer &reg_container) {
Vector<String> found_renames;
@ -1618,7 +1618,7 @@ void ProjectConverter3To4::rename_gdscript_functions(Vector<SourceLine> &source_
process_gdscript_line(line, reg_container, builtin);
}
}
};
}
Vector<String> ProjectConverter3To4::check_for_rename_gdscript_functions(Vector<String> &lines, const RegExContainer &reg_container, bool builtin) {
int current_line = 1;
@ -2438,7 +2438,7 @@ void ProjectConverter3To4::rename_csharp_functions(Vector<SourceLine> &source_li
process_csharp_line(line, reg_container);
}
}
};
}
Vector<String> ProjectConverter3To4::check_for_rename_csharp_functions(Vector<String> &lines, const RegExContainer &reg_container) {
int current_line = 1;
@ -2847,7 +2847,7 @@ void ProjectConverter3To4::custom_rename(Vector<SourceLine> &source_lines, const
line = reg.sub(line, to, true);
}
}
};
}
Vector<String> ProjectConverter3To4::check_for_custom_rename(Vector<String> &lines, const String &from, const String &to) {
Vector<String> found_renames;

View File

@ -49,7 +49,7 @@ class TabContainer;
class RenameDialog : public ConfirmationDialog {
GDCLASS(RenameDialog, ConfirmationDialog);
virtual void ok_pressed() override { rename(); };
virtual void ok_pressed() override { rename(); }
void _cancel_pressed() {}
void _features_toggled(bool pressed);
void _insert_text(const String &text);

View File

@ -54,9 +54,9 @@ protected:
static void _bind_methods();
public:
static SurfaceUpgradeTool *get_singleton() { return singleton; };
static SurfaceUpgradeTool *get_singleton() { return singleton; }
bool is_show_requested() const { return show_requested; };
bool is_show_requested() const { return show_requested; }
void show_popup() { _show_popup(); }
void prepare_upgrade();

View File

@ -50,8 +50,8 @@ public:
static void add_conversion_color_pair(const String &p_from_color, const String &p_to_color);
static void add_conversion_exception(const StringName &p_icon_name);
static HashMap<Color, Color> &get_color_conversion_map() { return color_conversion_map; };
static HashSet<StringName> &get_color_conversion_exceptions() { return color_conversion_exceptions; };
static HashMap<Color, Color> &get_color_conversion_map() { return color_conversion_map; }
static HashSet<StringName> &get_color_conversion_exceptions() { return color_conversion_exceptions; }
static void create();
static void finish();

View File

@ -0,0 +1,42 @@
# GLSL-specific rules.
# The rules should be the same as .clang-format, except those explicitly mentioned.
BasedOnStyle: LLVM
AccessModifierOffset: -4
AlignAfterOpenBracket: DontAlign
AlignOperands: DontAlign
AlignTrailingComments:
Kind: Never
OverEmptyLines: 0
AllowAllParametersOfDeclarationOnNextLine: false
BreakConstructorInitializers: AfterColon
ColumnLimit: 0
ConstructorInitializerIndentWidth: 8
ContinuationIndentWidth: 8
Cpp11BracedListStyle: false
IncludeCategories:
- Regex: ^".*"$
Priority: 1
- Regex: ^<.*\.h>$
Priority: 2
- Regex: ^<.*>$
Priority: 3
IndentCaseLabels: true
IndentWidth: 4
JavaImportGroups:
- org.godotengine
- android
- androidx
- com.android
- com.google
- java
- javax
KeepEmptyLinesAtTheStartOfBlocks: false
ObjCBlockIndentWidth: 4
PackConstructorInitializers: NextLine
RemoveSemicolon: false # Differs from base .clang-format
SpacesInLineCommentPrefix:
Minimum: 0
Maximum: -1
Standard: c++20
TabWidth: 4
UseTab: Always

View File

@ -161,7 +161,7 @@ bool CameraLinux::_can_query_format(int p_file_descriptor, int p_type) {
CameraLinux::CameraLinux() {
camera_thread.start(CameraLinux::camera_thread_func, this);
};
}
CameraLinux::~CameraLinux() {
exit_flag.set();

View File

@ -212,12 +212,12 @@ public:
AVCaptureDevice *CameraFeedMacOS::get_device() const {
return device;
};
}
CameraFeedMacOS::CameraFeedMacOS() {
device = nullptr;
capture_session = nullptr;
};
}
void CameraFeedMacOS::set_device(AVCaptureDevice *p_device) {
device = p_device;
@ -231,7 +231,7 @@ void CameraFeedMacOS::set_device(AVCaptureDevice *p_device) {
} else if ([p_device position] == AVCaptureDevicePositionFront) {
position = CameraFeed::FEED_FRONT;
};
};
}
bool CameraFeedMacOS::activate_feed() {
if (capture_session) {
@ -257,7 +257,7 @@ bool CameraFeedMacOS::activate_feed() {
};
return true;
};
}
void CameraFeedMacOS::deactivate_feed() {
// end camera capture if we have one
@ -265,7 +265,7 @@ void CameraFeedMacOS::deactivate_feed() {
[capture_session cleanup];
capture_session = nullptr;
};
};
}
//////////////////////////////////////////////////////////////////////////
// MyDeviceNotifications - This is a little helper class gets notifications
@ -351,7 +351,7 @@ void CameraMacOS::update_feeds() {
add_feed(newfeed);
};
};
};
}
CameraMacOS::CameraMacOS() {
// Find available cameras we have at this time
@ -359,4 +359,4 @@ CameraMacOS::CameraMacOS() {
// should only have one of these....
device_notifications = [[MyDeviceNotifications alloc] initForServer:this];
};
}

View File

@ -64,13 +64,13 @@ CameraFeedWindows::~CameraFeedWindows() {
};
///@TODO free up anything used by this
};
}
bool CameraFeedWindows::activate_feed() {
///@TODO this should activate our camera and start the process of capturing frames
return true;
};
}
///@TODO we should probably have a callback method here that is being called by the
// camera API which provides frames and call back into the CameraServer to update our texture
@ -91,4 +91,4 @@ CameraWindows::CameraWindows() {
add_active_cameras();
// need to add something that will react to devices being connected/removed...
};
}

View File

@ -79,7 +79,7 @@ public:
virtual bool is_past_cursor() const override;
virtual void push_expression_indented_block() override; // For lambdas, or blocks inside expressions.
virtual void pop_expression_indented_block() override; // For lambdas, or blocks inside expressions.
virtual bool is_text() override { return false; };
virtual bool is_text() override { return false; }
#ifdef TOOLS_ENABLED
virtual const HashMap<int, CommentData> &get_comments() const override {

View File

@ -70,7 +70,7 @@ public:
body->remove_constraint(this, i);
}
}
};
}
};
class GodotPinJoint2D : public GodotJoint2D {

View File

@ -116,7 +116,7 @@ void GodotPhysicsServer2D::shape_set_data(RID p_shape, const Variant &p_data) {
GodotShape2D *shape = shape_owner.get_or_null(p_shape);
ERR_FAIL_NULL(shape);
shape->set_data(p_data);
};
}
void GodotPhysicsServer2D::shape_set_custom_solver_bias(RID p_shape, real_t p_bias) {
GodotShape2D *shape = shape_owner.get_or_null(p_shape);
@ -128,14 +128,14 @@ PhysicsServer2D::ShapeType GodotPhysicsServer2D::shape_get_type(RID p_shape) con
const GodotShape2D *shape = shape_owner.get_or_null(p_shape);
ERR_FAIL_NULL_V(shape, SHAPE_CUSTOM);
return shape->get_type();
};
}
Variant GodotPhysicsServer2D::shape_get_data(RID p_shape) const {
const GodotShape2D *shape = shape_owner.get_or_null(p_shape);
ERR_FAIL_NULL_V(shape, Variant());
ERR_FAIL_COND_V(!shape->is_configured(), Variant());
return shape->get_data();
};
}
real_t GodotPhysicsServer2D::shape_get_custom_solver_bias(RID p_shape) const {
const GodotShape2D *shape = shape_owner.get_or_null(p_shape);
@ -226,7 +226,7 @@ RID GodotPhysicsServer2D::space_create() {
area->set_priority(-1);
return id;
};
}
void GodotPhysicsServer2D::space_set_active(RID p_space, bool p_active) {
GodotSpace2D *space = space_owner.get_or_null(p_space);
@ -445,13 +445,13 @@ void GodotPhysicsServer2D::area_set_param(RID p_area, AreaParameter p_param, con
GodotArea2D *area = area_owner.get_or_null(p_area);
ERR_FAIL_NULL(area);
area->set_param(p_param, p_value);
};
}
void GodotPhysicsServer2D::area_set_transform(RID p_area, const Transform2D &p_transform) {
GodotArea2D *area = area_owner.get_or_null(p_area);
ERR_FAIL_NULL(area);
area->set_transform(p_transform);
};
}
Variant GodotPhysicsServer2D::area_get_param(RID p_area, AreaParameter p_param) const {
if (space_owner.owns(p_area)) {
@ -462,14 +462,14 @@ Variant GodotPhysicsServer2D::area_get_param(RID p_area, AreaParameter p_param)
ERR_FAIL_NULL_V(area, Variant());
return area->get_param(p_param);
};
}
Transform2D GodotPhysicsServer2D::area_get_transform(RID p_area) const {
GodotArea2D *area = area_owner.get_or_null(p_area);
ERR_FAIL_NULL_V(area, Transform2D());
return area->get_transform();
};
}
void GodotPhysicsServer2D::area_set_pickable(RID p_area, bool p_pickable) {
GodotArea2D *area = area_owner.get_or_null(p_area);
@ -551,7 +551,7 @@ void GodotPhysicsServer2D::body_set_space(RID p_body, RID p_space) {
body->clear_constraint_list();
body->set_space(space);
};
}
RID GodotPhysicsServer2D::body_get_space(RID p_body) const {
GodotBody2D *body = body_owner.get_or_null(p_body);
@ -562,7 +562,7 @@ RID GodotPhysicsServer2D::body_get_space(RID p_body) const {
return RID();
}
return space->get_self();
};
}
void GodotPhysicsServer2D::body_set_mode(RID p_body, BodyMode p_mode) {
GodotBody2D *body = body_owner.get_or_null(p_body);
@ -570,14 +570,14 @@ void GodotPhysicsServer2D::body_set_mode(RID p_body, BodyMode p_mode) {
FLUSH_QUERY_CHECK(body);
body->set_mode(p_mode);
};
}
PhysicsServer2D::BodyMode GodotPhysicsServer2D::body_get_mode(RID p_body) const {
GodotBody2D *body = body_owner.get_or_null(p_body);
ERR_FAIL_NULL_V(body, BODY_MODE_STATIC);
return body->get_mode();
};
}
void GodotPhysicsServer2D::body_add_shape(RID p_body, RID p_shape, const Transform2D &p_transform, bool p_disabled) {
GodotBody2D *body = body_owner.get_or_null(p_body);
@ -902,7 +902,7 @@ void GodotPhysicsServer2D::body_set_axis_velocity(RID p_body, const Vector2 &p_a
v += p_axis_velocity;
body->set_linear_velocity(v);
body->wakeup();
};
}
void GodotPhysicsServer2D::body_add_collision_exception(RID p_body, RID p_body_b) {
GodotBody2D *body = body_owner.get_or_null(p_body);
@ -910,7 +910,7 @@ void GodotPhysicsServer2D::body_add_collision_exception(RID p_body, RID p_body_b
body->add_exception(p_body_b);
body->wakeup();
};
}
void GodotPhysicsServer2D::body_remove_collision_exception(RID p_body, RID p_body_b) {
GodotBody2D *body = body_owner.get_or_null(p_body);
@ -918,7 +918,7 @@ void GodotPhysicsServer2D::body_remove_collision_exception(RID p_body, RID p_bod
body->remove_exception(p_body_b);
body->wakeup();
};
}
void GodotPhysicsServer2D::body_get_collision_exceptions(RID p_body, List<RID> *p_exceptions) {
GodotBody2D *body = body_owner.get_or_null(p_body);
@ -927,31 +927,31 @@ void GodotPhysicsServer2D::body_get_collision_exceptions(RID p_body, List<RID> *
for (int i = 0; i < body->get_exceptions().size(); i++) {
p_exceptions->push_back(body->get_exceptions()[i]);
}
};
}
void GodotPhysicsServer2D::body_set_contacts_reported_depth_threshold(RID p_body, real_t p_threshold) {
GodotBody2D *body = body_owner.get_or_null(p_body);
ERR_FAIL_NULL(body);
};
}
real_t GodotPhysicsServer2D::body_get_contacts_reported_depth_threshold(RID p_body) const {
GodotBody2D *body = body_owner.get_or_null(p_body);
ERR_FAIL_NULL_V(body, 0);
return 0;
};
}
void GodotPhysicsServer2D::body_set_omit_force_integration(RID p_body, bool p_omit) {
GodotBody2D *body = body_owner.get_or_null(p_body);
ERR_FAIL_NULL(body);
body->set_omit_force_integration(p_omit);
};
}
bool GodotPhysicsServer2D::body_is_omitting_force_integration(RID p_body) const {
GodotBody2D *body = body_owner.get_or_null(p_body);
ERR_FAIL_NULL_V(body, false);
return body->get_omit_force_integration();
};
}
void GodotPhysicsServer2D::body_set_max_contacts_reported(RID p_body, int p_contacts) {
GodotBody2D *body = body_owner.get_or_null(p_body);

View File

@ -106,7 +106,7 @@ void GodotPhysicsServer3D::shape_set_data(RID p_shape, const Variant &p_data) {
GodotShape3D *shape = shape_owner.get_or_null(p_shape);
ERR_FAIL_NULL(shape);
shape->set_data(p_data);
};
}
void GodotPhysicsServer3D::shape_set_custom_solver_bias(RID p_shape, real_t p_bias) {
GodotShape3D *shape = shape_owner.get_or_null(p_shape);
@ -118,14 +118,14 @@ PhysicsServer3D::ShapeType GodotPhysicsServer3D::shape_get_type(RID p_shape) con
const GodotShape3D *shape = shape_owner.get_or_null(p_shape);
ERR_FAIL_NULL_V(shape, SHAPE_CUSTOM);
return shape->get_type();
};
}
Variant GodotPhysicsServer3D::shape_get_data(RID p_shape) const {
const GodotShape3D *shape = shape_owner.get_or_null(p_shape);
ERR_FAIL_NULL_V(shape, Variant());
ERR_FAIL_COND_V(!shape->is_configured(), Variant());
return shape->get_data();
};
}
void GodotPhysicsServer3D::shape_set_margin(RID p_shape, real_t p_margin) {
}
@ -156,7 +156,7 @@ RID GodotPhysicsServer3D::space_create() {
space->set_static_global_body(sgb);
return id;
};
}
void GodotPhysicsServer3D::space_set_active(RID p_space, bool p_active) {
GodotSpace3D *space = space_owner.get_or_null(p_space);
@ -354,13 +354,13 @@ void GodotPhysicsServer3D::area_set_param(RID p_area, AreaParameter p_param, con
GodotArea3D *area = area_owner.get_or_null(p_area);
ERR_FAIL_NULL(area);
area->set_param(p_param, p_value);
};
}
void GodotPhysicsServer3D::area_set_transform(RID p_area, const Transform3D &p_transform) {
GodotArea3D *area = area_owner.get_or_null(p_area);
ERR_FAIL_NULL(area);
area->set_transform(p_transform);
};
}
Variant GodotPhysicsServer3D::area_get_param(RID p_area, AreaParameter p_param) const {
if (space_owner.owns(p_area)) {
@ -371,14 +371,14 @@ Variant GodotPhysicsServer3D::area_get_param(RID p_area, AreaParameter p_param)
ERR_FAIL_NULL_V(area, Variant());
return area->get_param(p_param);
};
}
Transform3D GodotPhysicsServer3D::area_get_transform(RID p_area) const {
GodotArea3D *area = area_owner.get_or_null(p_area);
ERR_FAIL_NULL_V(area, Transform3D());
return area->get_transform();
};
}
void GodotPhysicsServer3D::area_set_collision_layer(RID p_area, uint32_t p_layer) {
GodotArea3D *area = area_owner.get_or_null(p_area);
@ -444,7 +444,7 @@ RID GodotPhysicsServer3D::body_create() {
RID rid = body_owner.make_rid(body);
body->set_self(rid);
return rid;
};
}
void GodotPhysicsServer3D::body_set_space(RID p_body, RID p_space) {
GodotBody3D *body = body_owner.get_or_null(p_body);
@ -462,7 +462,7 @@ void GodotPhysicsServer3D::body_set_space(RID p_body, RID p_space) {
body->clear_constraint_map();
body->set_space(space);
};
}
RID GodotPhysicsServer3D::body_get_space(RID p_body) const {
GodotBody3D *body = body_owner.get_or_null(p_body);
@ -473,21 +473,21 @@ RID GodotPhysicsServer3D::body_get_space(RID p_body) const {
return RID();
}
return space->get_self();
};
}
void GodotPhysicsServer3D::body_set_mode(RID p_body, BodyMode p_mode) {
GodotBody3D *body = body_owner.get_or_null(p_body);
ERR_FAIL_NULL(body);
body->set_mode(p_mode);
};
}
PhysicsServer3D::BodyMode GodotPhysicsServer3D::body_get_mode(RID p_body) const {
GodotBody3D *body = body_owner.get_or_null(p_body);
ERR_FAIL_NULL_V(body, BODY_MODE_STATIC);
return body->get_mode();
};
}
void GodotPhysicsServer3D::body_add_shape(RID p_body, RID p_shape, const Transform3D &p_transform, bool p_disabled) {
GodotBody3D *body = body_owner.get_or_null(p_body);
@ -836,7 +836,7 @@ void GodotPhysicsServer3D::body_add_collision_exception(RID p_body, RID p_body_b
body->add_exception(p_body_b);
body->wakeup();
};
}
void GodotPhysicsServer3D::body_remove_collision_exception(RID p_body, RID p_body_b) {
GodotBody3D *body = body_owner.get_or_null(p_body);
@ -844,7 +844,7 @@ void GodotPhysicsServer3D::body_remove_collision_exception(RID p_body, RID p_bod
body->remove_exception(p_body_b);
body->wakeup();
};
}
void GodotPhysicsServer3D::body_get_collision_exceptions(RID p_body, List<RID> *p_exceptions) {
GodotBody3D *body = body_owner.get_or_null(p_body);
@ -853,31 +853,31 @@ void GodotPhysicsServer3D::body_get_collision_exceptions(RID p_body, List<RID> *
for (int i = 0; i < body->get_exceptions().size(); i++) {
p_exceptions->push_back(body->get_exceptions()[i]);
}
};
}
void GodotPhysicsServer3D::body_set_contacts_reported_depth_threshold(RID p_body, real_t p_threshold) {
GodotBody3D *body = body_owner.get_or_null(p_body);
ERR_FAIL_NULL(body);
};
}
real_t GodotPhysicsServer3D::body_get_contacts_reported_depth_threshold(RID p_body) const {
GodotBody3D *body = body_owner.get_or_null(p_body);
ERR_FAIL_NULL_V(body, 0);
return 0;
};
}
void GodotPhysicsServer3D::body_set_omit_force_integration(RID p_body, bool p_omit) {
GodotBody3D *body = body_owner.get_or_null(p_body);
ERR_FAIL_NULL(body);
body->set_omit_force_integration(p_omit);
};
}
bool GodotPhysicsServer3D::body_is_omitting_force_integration(RID p_body) const {
GodotBody3D *body = body_owner.get_or_null(p_body);
ERR_FAIL_NULL_V(body, false);
return body->get_omit_force_integration();
};
}
void GodotPhysicsServer3D::body_set_max_contacts_reported(RID p_body, int p_contacts) {
GodotBody3D *body = body_owner.get_or_null(p_body);
@ -1770,4 +1770,4 @@ GodotPhysicsServer3D::GodotPhysicsServer3D(bool p_using_threads) {
GodotBroadPhase3D::create_func = GodotBroadPhase3DBVH::_create;
using_threads = p_using_threads;
};
}

View File

@ -1121,7 +1121,7 @@ struct AABBQueryResult {
_FORCE_INLINE_ bool operator()(void *p_data) {
return result_callback(soft_body->get_node_index(p_data), userdata);
};
}
};
void GodotSoftBody3D::query_aabb(const AABB &p_aabb, GodotSoftBody3D::QueryResultCallback p_result_callback, void *p_userdata) {
@ -1140,7 +1140,7 @@ struct RayQueryResult {
_FORCE_INLINE_ bool operator()(void *p_data) {
return result_callback(soft_body->get_face_index(p_data), userdata);
};
}
};
void GodotSoftBody3D::query_ray(const Vector3 &p_from, const Vector3 &p_to, GodotSoftBody3D::QueryResultCallback p_result_callback, void *p_userdata) {

View File

@ -57,7 +57,7 @@ public:
virtual Error save(const String &p_path, bool p_public_only);
virtual String save_to_string(bool p_public_only);
virtual Error load_from_string(const String &p_string_key, bool p_public_only);
virtual bool is_public_only() const { return public_only; };
virtual bool is_public_only() const { return public_only; }
CryptoKeyMbedTLS() {
mbedtls_pk_init(&pkey);

View File

@ -37,11 +37,11 @@
StringName MobileVRInterface::get_name() const {
return "Native mobile";
};
}
uint32_t MobileVRInterface::get_capabilities() const {
return XRInterface::XR_STEREO;
};
}
Vector3 MobileVRInterface::scale_magneto(const Vector3 &p_magnetometer) {
// Our magnetometer doesn't give us nice clean data.
@ -98,7 +98,7 @@ Vector3 MobileVRInterface::scale_magneto(const Vector3 &p_magnetometer) {
};
return mag_scaled;
};
}
Basis MobileVRInterface::combine_acc_mag(const Vector3 &p_grav, const Vector3 &p_magneto) {
// yup, stock standard cross product solution...
@ -117,7 +117,7 @@ Basis MobileVRInterface::combine_acc_mag(const Vector3 &p_grav, const Vector3 &p
acc_mag_m3.rows[2] = magneto;
return acc_mag_m3;
};
}
void MobileVRInterface::set_position_from_sensors() {
_THREAD_SAFE_METHOD_
@ -215,7 +215,7 @@ void MobileVRInterface::set_position_from_sensors() {
head_transform.basis = orientation.orthonormalized();
last_ticks = ticks;
};
}
void MobileVRInterface::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_eye_height", "eye_height"), &MobileVRInterface::set_eye_height);
@ -280,51 +280,51 @@ Rect2 MobileVRInterface::get_offset_rect() const {
void MobileVRInterface::set_iod(const double p_iod) {
intraocular_dist = p_iod;
};
}
double MobileVRInterface::get_iod() const {
return intraocular_dist;
};
}
void MobileVRInterface::set_display_width(const double p_display_width) {
display_width = p_display_width;
};
}
double MobileVRInterface::get_display_width() const {
return display_width;
};
}
void MobileVRInterface::set_display_to_lens(const double p_display_to_lens) {
display_to_lens = p_display_to_lens;
};
}
double MobileVRInterface::get_display_to_lens() const {
return display_to_lens;
};
}
void MobileVRInterface::set_oversample(const double p_oversample) {
oversample = p_oversample;
};
}
double MobileVRInterface::get_oversample() const {
return oversample;
};
}
void MobileVRInterface::set_k1(const double p_k1) {
k1 = p_k1;
};
}
double MobileVRInterface::get_k1() const {
return k1;
};
}
void MobileVRInterface::set_k2(const double p_k2) {
k2 = p_k2;
};
}
double MobileVRInterface::get_k2() const {
return k2;
};
}
float MobileVRInterface::get_vrs_min_radius() const {
return xr_vrs.get_vrs_min_radius();
@ -345,7 +345,7 @@ void MobileVRInterface::set_vrs_strength(float p_vrs_strength) {
uint32_t MobileVRInterface::get_view_count() {
// needs stereo...
return 2;
};
}
XRInterface::TrackingStatus MobileVRInterface::get_tracking_status() const {
return tracking_state;
@ -353,7 +353,7 @@ XRInterface::TrackingStatus MobileVRInterface::get_tracking_status() const {
bool MobileVRInterface::is_initialized() const {
return (initialized);
};
}
bool MobileVRInterface::initialize() {
XRServer *xr_server = XRServer::get_singleton();
@ -387,7 +387,7 @@ bool MobileVRInterface::initialize() {
};
return true;
};
}
void MobileVRInterface::uninitialize() {
if (initialized) {
@ -408,7 +408,7 @@ void MobileVRInterface::uninitialize() {
initialized = false;
};
};
}
Dictionary MobileVRInterface::get_system_info() {
Dictionary dict;
@ -442,7 +442,7 @@ Size2 MobileVRInterface::get_render_target_size() {
target_size.y *= oversample;
return target_size;
};
}
Transform3D MobileVRInterface::get_camera_transform() {
_THREAD_SAFE_METHOD_
@ -463,7 +463,7 @@ Transform3D MobileVRInterface::get_camera_transform() {
}
return transform_for_eye;
};
}
Transform3D MobileVRInterface::get_transform_for_view(uint32_t p_view, const Transform3D &p_cam_transform) {
_THREAD_SAFE_METHOD_
@ -497,7 +497,7 @@ Transform3D MobileVRInterface::get_transform_for_view(uint32_t p_view, const Tra
};
return transform_for_eye;
};
}
Projection MobileVRInterface::get_projection_for_view(uint32_t p_view, double p_aspect, double p_z_near, double p_z_far) {
_THREAD_SAFE_METHOD_
@ -508,7 +508,7 @@ Projection MobileVRInterface::get_projection_for_view(uint32_t p_view, double p_
eye.set_for_hmd(p_view + 1, p_aspect, intraocular_dist, display_width, display_to_lens, oversample, p_z_near, p_z_far);
return eye;
};
}
Vector<BlitToScreen> MobileVRInterface::post_draw_viewport(RID p_render_target, const Rect2 &p_screen_rect) {
_THREAD_SAFE_METHOD_
@ -571,7 +571,7 @@ void MobileVRInterface::process() {
head->set_pose("default", head_transform, Vector3(), Vector3(), tracking_confidence);
}
};
};
}
RID MobileVRInterface::get_vrs_texture() {
PackedVector2Array eye_foci;
@ -597,4 +597,4 @@ MobileVRInterface::~MobileVRInterface() {
if (is_initialized()) {
uninitialize();
};
};
}

View File

@ -97,19 +97,19 @@ private:
float floor_decimals(const float p_value, const float p_decimals) {
float power_of_10 = pow(10.0f, p_decimals);
return floor(p_value * power_of_10) / power_of_10;
};
}
Vector3 floor_decimals(const Vector3 &p_vector, const float p_decimals) {
return Vector3(floor_decimals(p_vector.x, p_decimals), floor_decimals(p_vector.y, p_decimals), floor_decimals(p_vector.z, p_decimals));
};
}
Vector3 low_pass(const Vector3 &p_vector, const Vector3 &p_last_vector, const float p_factor) {
return p_vector + (p_factor * (p_last_vector - p_vector));
};
}
Vector3 scrub(const Vector3 &p_vector, const Vector3 &p_last_vector, const float p_decimals, const float p_factor) {
return low_pass(floor_decimals(p_vector, p_decimals), p_last_vector, p_factor);
};
}
void set_position_from_sensors();

View File

@ -500,8 +500,8 @@ Vector<ScriptLanguage::StackInfo> CSharpLanguage::debug_get_current_stack_info()
}
_recursion_flag_ = true;
SCOPE_EXIT {
_recursion_flag_ = false;
};
_recursion_flag_ = false; // clang-format off
}; // clang-format on
if (!gdmono || !gdmono->is_runtime_initialized()) {
return Vector<StackInfo>();

View File

@ -52,14 +52,14 @@ public:
virtual void set_target_peer(int p_peer_id) override {}
virtual int get_packet_peer() const override { return 0; }
virtual TransferMode get_packet_mode() const override { return TRANSFER_MODE_RELIABLE; };
virtual TransferMode get_packet_mode() const override { return TRANSFER_MODE_RELIABLE; }
virtual int get_packet_channel() const override { return 0; }
virtual void disconnect_peer(int p_peer, bool p_force = false) override {}
virtual bool is_server() const override { return true; }
virtual void poll() override {}
virtual void close() override {}
virtual int get_unique_id() const override { return TARGET_PEER_SERVER; }
virtual ConnectionStatus get_connection_status() const override { return CONNECTION_CONNECTED; };
virtual ConnectionStatus get_connection_status() const override { return CONNECTION_CONNECTED; }
};
class SceneMultiplayer : public MultiplayerAPI {

View File

@ -755,7 +755,7 @@ void NavMeshGenerator2D::generator_parse_source_geometry_data(Ref<NavigationPoly
for (Node *E : parse_nodes) {
generator_parse_geometry_node(p_navigation_mesh, p_source_geometry_data, E, recurse_children);
}
};
}
static void generator_recursive_process_polytree_items(List<TPPLPoly> &p_tppl_in_polygon, const Clipper2Lib::PolyPathD *p_polypath_item) {
using namespace Clipper2Lib;

View File

@ -660,7 +660,7 @@ void NavMeshGenerator3D::generator_parse_source_geometry_data(const Ref<Navigati
for (Node *parse_node : parse_nodes) {
generator_parse_geometry_node(p_navigation_mesh, p_source_geometry_data, parse_node, recurse_children);
}
};
}
void NavMeshGenerator3D::generator_bake_from_source_geometry_data(Ref<NavigationMesh> p_navigation_mesh, const Ref<NavigationMeshSourceGeometryData3D> &p_source_geometry_data) {
if (p_navigation_mesh.is_null() || p_source_geometry_data.is_null()) {

View File

@ -308,7 +308,7 @@ void NavAgent::set_avoidance_priority(real_t p_priority) {
rvo_agent_2d.avoidance_priority_ = avoidance_priority;
}
agent_dirty = true;
};
}
bool NavAgent::check_dirty() {
const bool was_dirty = agent_dirty;

View File

@ -130,13 +130,13 @@ public:
const Vector3 &get_velocity_forced() const { return velocity_forced; }
void set_avoidance_layers(uint32_t p_layers);
uint32_t get_avoidance_layers() const { return avoidance_layers; };
uint32_t get_avoidance_layers() const { return avoidance_layers; }
void set_avoidance_mask(uint32_t p_mask);
uint32_t get_avoidance_mask() const { return avoidance_mask; };
uint32_t get_avoidance_mask() const { return avoidance_mask; }
void set_avoidance_priority(real_t p_priority);
real_t get_avoidance_priority() const { return avoidance_priority; };
real_t get_avoidance_priority() const { return avoidance_priority; }
void set_paused(bool p_paused);
bool get_paused() const;

View File

@ -57,7 +57,7 @@ void NavLink::set_enabled(bool p_enabled) {
// TODO: This should not require a full rebuild as the link has not really changed.
link_dirty = true;
};
}
void NavLink::set_bidirectional(bool p_bidirectional) {
if (bidirectional == p_bidirectional) {

View File

@ -92,7 +92,7 @@ public:
bool is_map_changed();
void set_avoidance_layers(uint32_t p_layers);
uint32_t get_avoidance_layers() const { return avoidance_layers; };
uint32_t get_avoidance_layers() const { return avoidance_layers; }
void set_paused(bool p_paused);
bool get_paused() const;

View File

@ -59,7 +59,7 @@ void NavRegion::set_enabled(bool p_enabled) {
// TODO: This should not require a full rebuild as the region has not really changed.
polygons_dirty = true;
};
}
void NavRegion::set_use_edge_connections(bool p_enabled) {
if (use_edge_connections != p_enabled) {

View File

@ -94,7 +94,7 @@ public:
gd::ClosestPointQueryResult get_closest_point_info(const Vector3 &p_point) const;
Vector3 get_random_point(uint32_t p_navigation_layers, bool p_uniformly) const;
real_t get_surface_area() const { return surface_area; };
real_t get_surface_area() const { return surface_area; }
bool sync();

View File

@ -44,7 +44,7 @@ class NoiseTextureTester : public RefCounted {
public:
NoiseTextureTester(const NoiseTexture2D *const p_texture) :
texture{ p_texture } {};
texture{ p_texture } {}
Color compute_average_color(const Ref<Image> &p_noise_image) {
Color r_avg_color{};

View File

@ -44,7 +44,7 @@ class NoiseTexture3DTester : public RefCounted {
public:
NoiseTexture3DTester(const NoiseTexture3D *const p_texture) :
texture{ p_texture } {};
texture{ p_texture } {}
Color compute_average_color(const Ref<Image> &p_noise_image) {
Color r_avg_color{};

View File

@ -68,7 +68,7 @@ protected:
void _do_set_action_type(OpenXRAction::ActionType p_action_type);
public:
Ref<OpenXRAction> get_action() { return action; };
Ref<OpenXRAction> get_action() { return action; }
OpenXRActionEditor(Ref<OpenXRAction> p_action);
};

View File

@ -87,7 +87,7 @@ protected:
void _do_remove_action_editor(OpenXRActionEditor *p_action_editor);
public:
Ref<OpenXRActionSet> get_action_set() { return action_set; };
Ref<OpenXRActionSet> get_action_set() { return action_set; }
void set_focus_on_entry();
void remove_all_actions();

View File

@ -1294,7 +1294,7 @@ bool OpenXRAPI::create_main_swapchains(Size2i p_size) {
}
return true;
};
}
void OpenXRAPI::destroy_session() {
// TODO need to figure out if we're still rendering our current frame
@ -2353,7 +2353,7 @@ void OpenXRAPI::post_draw_viewport(RID p_render_target) {
for (OpenXRExtensionWrapper *wrapper : registered_extension_wrappers) {
wrapper->on_post_draw_viewport(p_render_target);
}
};
}
void OpenXRAPI::end_frame() {
XrResult result;

View File

@ -396,12 +396,12 @@ private:
}
public:
XrInstance get_instance() const { return instance; };
XrSystemId get_system_id() const { return system_id; };
XrSession get_session() const { return session; };
OpenXRGraphicsExtensionWrapper *get_graphics_extension() const { return graphics_extension; };
String get_runtime_name() const { return runtime_name; };
String get_runtime_version() const { return runtime_version; };
XrInstance get_instance() const { return instance; }
XrSystemId get_system_id() const { return system_id; }
XrSession get_session() const { return session; }
OpenXRGraphicsExtensionWrapper *get_graphics_extension() const { return graphics_extension; }
String get_runtime_name() const { return runtime_name; }
String get_runtime_version() const { return runtime_version; }
// helper method to convert an XrPosef to a Transform3D
Transform3D transform_from_pose(const XrPosef &p_pose);

View File

@ -160,11 +160,11 @@ void OpenXRInterface::_bind_methods() {
StringName OpenXRInterface::get_name() const {
return StringName("OpenXR");
};
}
uint32_t OpenXRInterface::get_capabilities() const {
return XRInterface::XR_VR + XRInterface::XR_STEREO;
};
}
PackedStringArray OpenXRInterface::get_suggested_tracker_names() const {
// These are hardcoded in OpenXR, note that they will only be available if added to our action map
@ -611,7 +611,7 @@ bool OpenXRInterface::initialize_on_startup() const {
bool OpenXRInterface::is_initialized() const {
return initialized;
};
}
bool OpenXRInterface::initialize() {
XRServer *xr_server = XRServer::get_singleton();

View File

@ -156,11 +156,11 @@ bool TextServerFallback::_has(const RID &p_rid) {
String TextServerFallback::_get_support_data_filename() const {
return "";
};
}
String TextServerFallback::_get_support_data_info() const {
return "Not supported";
};
}
bool TextServerFallback::_load_support_data(const String &p_filename) {
return false; // No extra data used.
@ -4728,7 +4728,7 @@ void TextServerFallback::_update_settings() {
TextServerFallback::TextServerFallback() {
_insert_feature_sets();
ProjectSettings::get_singleton()->connect("settings_changed", callable_mp(this, &TextServerFallback::_update_settings));
};
}
void TextServerFallback::_cleanup() {
for (const KeyValue<SystemFontKey, SystemFontCache> &E : system_fonts) {
@ -4747,4 +4747,4 @@ TextServerFallback::~TextServerFallback() {
FT_Done_FreeType(ft_library);
}
#endif
};
}

View File

@ -645,7 +645,7 @@ VideoStreamPlaybackTheora::~VideoStreamPlaybackTheora() {
memdelete(thread_sem);
#endif
clear();
};
}
void VideoStreamTheora::_bind_methods() {}

View File

@ -150,5 +150,5 @@ WebRTCPeerConnectionJS::~WebRTCPeerConnectionJS() {
godot_js_rtc_pc_destroy(_js_id);
_js_id = 0;
}
};
}
#endif

View File

@ -84,7 +84,7 @@ public:
virtual int get_available_packet_count() const override;
virtual Error get_packet(const uint8_t **r_buffer, int &r_buffer_size) override;
virtual Error put_packet(const uint8_t *p_buffer, int p_buffer_size) override;
virtual int get_max_packet_size() const override { return packet_buffer.size(); };
virtual int get_max_packet_size() const override { return packet_buffer.size(); }
// WebSocketPeer
virtual Error send(const uint8_t *p_buffer, int p_buffer_size, WriteMode p_mode) override;

View File

@ -127,7 +127,7 @@ public:
virtual int get_available_packet_count() const override;
virtual Error get_packet(const uint8_t **r_buffer, int &r_buffer_size) override;
virtual Error put_packet(const uint8_t *p_buffer, int p_buffer_size) override;
virtual int get_max_packet_size() const override { return packet_buffer.size(); };
virtual int get_max_packet_size() const override { return packet_buffer.size(); }
// WebSocketPeer
virtual Error send(const uint8_t *p_buffer, int p_buffer_size, WriteMode p_mode) override;

View File

@ -271,19 +271,19 @@ void WebXRInterfaceJS::_set_environment_blend_mode(String p_blend_mode_string) {
StringName WebXRInterfaceJS::get_name() const {
return "WebXR";
};
}
uint32_t WebXRInterfaceJS::get_capabilities() const {
return XRInterface::XR_STEREO | XRInterface::XR_MONO | XRInterface::XR_VR | XRInterface::XR_AR;
};
}
uint32_t WebXRInterfaceJS::get_view_count() {
return godot_webxr_get_view_count();
};
}
bool WebXRInterfaceJS::is_initialized() const {
return (initialized);
};
}
bool WebXRInterfaceJS::initialize() {
XRServer *xr_server = XRServer::get_singleton();
@ -333,7 +333,7 @@ bool WebXRInterfaceJS::initialize() {
};
return true;
};
}
void WebXRInterfaceJS::uninitialize() {
if (initialized) {
@ -378,7 +378,7 @@ void WebXRInterfaceJS::uninitialize() {
environment_blend_mode = XRInterface::XR_ENV_BLEND_MODE_OPAQUE;
initialized = false;
};
};
}
Dictionary WebXRInterfaceJS::get_system_info() {
Dictionary dict;
@ -427,7 +427,7 @@ Size2 WebXRInterfaceJS::get_render_target_size() {
render_targetsize.height = (float)js_size[1];
return render_targetsize;
};
}
Transform3D WebXRInterfaceJS::get_camera_transform() {
Transform3D camera_transform;
@ -445,7 +445,7 @@ Transform3D WebXRInterfaceJS::get_camera_transform() {
}
return camera_transform;
};
}
Transform3D WebXRInterfaceJS::get_transform_for_view(uint32_t p_view, const Transform3D &p_cam_transform) {
XRServer *xr_server = XRServer::get_singleton();
@ -464,7 +464,7 @@ Transform3D WebXRInterfaceJS::get_transform_for_view(uint32_t p_view, const Tran
transform_for_view.origin *= world_scale;
return p_cam_transform * xr_server->get_reference_frame() * transform_for_view;
};
}
Projection WebXRInterfaceJS::get_projection_for_view(uint32_t p_view, double p_aspect, double p_z_near, double p_z_far) {
Projection view;
@ -527,7 +527,7 @@ Vector<BlitToScreen> WebXRInterfaceJS::post_draw_viewport(RID p_render_target, c
texture_storage->render_target_set_reattach_textures(p_render_target, false);
return blit_to_screen;
};
}
RID WebXRInterfaceJS::_get_color_texture() {
unsigned int texture_id = godot_webxr_get_color_texture();
@ -608,7 +608,7 @@ void WebXRInterfaceJS::process() {
_update_input_source(i);
}
};
};
}
void WebXRInterfaceJS::_update_input_source(int p_input_source_id) {
XRServer *xr_server = XRServer::get_singleton();
@ -871,13 +871,13 @@ WebXRInterfaceJS::WebXRInterfaceJS() {
initialized = false;
session_mode = "inline";
requested_reference_space_types = "local";
};
}
WebXRInterfaceJS::~WebXRInterfaceJS() {
// and make sure we cleanup if we haven't already
if (initialized) {
uninitialize();
};
};
}
#endif // WEB_ENABLED

View File

@ -42,7 +42,7 @@ void iOS::_bind_methods() {
ClassDB::bind_method(D_METHOD("supports_haptic_engine"), &iOS::supports_haptic_engine);
ClassDB::bind_method(D_METHOD("start_haptic_engine"), &iOS::start_haptic_engine);
ClassDB::bind_method(D_METHOD("stop_haptic_engine"), &iOS::stop_haptic_engine);
};
}
bool iOS::supports_haptic_engine() {
if (@available(iOS 13, *)) {

View File

@ -38,7 +38,7 @@ public:
void initialize();
void disable();
bool is_disabled() const { return disabled; };
bool is_disabled() const { return disabled; }
CrashHandler();
~CrashHandler();

View File

@ -55,7 +55,7 @@ class EditorExportPlatformLinuxBSD : public EditorExportPlatformPC {
ssh_args = p_ssh_arg;
cmd_args = p_cmd_args;
wait = p_wait;
};
}
};
Ref<ImageTexture> run_icon;

Some files were not shown because too many files have changed in this diff Show More