Skip to content

Commit

Permalink
Set clang-format RemoveSemicolon rule to true
Browse files Browse the repository at this point in the history
  • Loading branch information
adamscott committed Oct 7, 2024
1 parent db66bd3 commit b637c9b
Show file tree
Hide file tree
Showing 184 changed files with 3,805 additions and 3,809 deletions.
2 changes: 1 addition & 1 deletion .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ PackConstructorInitializers: NextLine
# ReflowComments: true
# RemoveBracesLLVM: false
# RemoveParentheses: Leave
# RemoveSemicolon: false
RemoveSemicolon: true
# RequiresClausePosition: OwnLine
# RequiresExpressionIndentation: OuterScope
# SeparateDefinitionBlocks: Leave
Expand Down
4 changes: 2 additions & 2 deletions core/core_bind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion core/debugger/engine_debugger.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class EngineDebugger {
_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();
Expand Down
4 changes: 2 additions & 2 deletions core/io/dir_access.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ class DirAccess : public RefCounted {

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;

Expand Down
4 changes: 2 additions & 2 deletions core/io/file_access.h
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,8 @@ class FileAccess : public RefCounted {
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);
Expand Down
2 changes: 1 addition & 1 deletion core/io/ip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ struct _IP_ResolverPrivate {
response.clear();
type = IP::TYPE_NONE;
hostname = "";
};
}

QueueItem() {
clear();
Expand Down
2 changes: 1 addition & 1 deletion core/io/resource_loader.h
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ class ResourceLoader {
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);
Expand Down
2 changes: 1 addition & 1 deletion core/math/basis.h
Original file line number Diff line number Diff line change
Expand Up @@ -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); }
Expand Down
2 changes: 1 addition & 1 deletion core/math/geometry_2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,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 {
Expand Down
2 changes: 1 addition & 1 deletion core/math/plane.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion core/object/method_bind.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class MethodBind {
_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; }
Expand Down
24 changes: 12 additions & 12 deletions core/object/object.h
Original file line number Diff line number Diff line change
Expand Up @@ -685,22 +685,22 @@ class Object {
_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())() {
Expand Down
4 changes: 2 additions & 2 deletions core/object/script_language.h
Original file line number Diff line number Diff line change
Expand Up @@ -446,8 +446,8 @@ class PlaceHolderScriptInstance : public ScriptInstance {
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;
Expand Down
8 changes: 4 additions & 4 deletions core/os/os.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,14 +177,14 @@ class OS {
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;
Expand Down
2 changes: 1 addition & 1 deletion core/string/translation_domain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions core/string/ustring.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class Char16String {
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);
Expand Down Expand Up @@ -160,7 +160,7 @@ class CharString {
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);
Expand Down
2 changes: 1 addition & 1 deletion core/templates/cowdata.h
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ class CowData {

_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>
Expand Down
2 changes: 1 addition & 1 deletion core/templates/lru.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class LRUCache {
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);
Expand Down
2 changes: 1 addition & 1 deletion core/templates/rb_set.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class RBSet {
}
const T &get() const {
return value;
};
}
Element() {}
};

Expand Down
Loading

0 comments on commit b637c9b

Please sign in to comment.