Style: Remove redundant void argument lists

Using clang-tidy's `modernize-redundant-void-arg`.
https://clang.llvm.org/extra/clang-tidy/checks/modernize-redundant-void-arg.html
This commit is contained in:
Rémi Verschelde 2021-05-04 16:40:33 +02:00
parent b4af1eba0a
commit 0c8b5b5c4d
No known key found for this signature in database
GPG Key ID: C3336907360768E1
17 changed files with 33 additions and 33 deletions

View File

@ -1,5 +1,5 @@
---
Checks: 'clang-diagnostic-*,clang-analyzer-*,-*,modernize-use-bool-literals,modernize-use-nullptr'
Checks: 'clang-diagnostic-*,clang-analyzer-*,-*,modernize-redundant-void-arg,modernize-use-bool-literals,modernize-use-nullptr'
WarningsAsErrors: ''
HeaderFilterRegex: '.*'
AnalyzeTemporaryDtors: false

View File

@ -352,7 +352,7 @@ bool test_solutions() {
return true;
}
typedef bool (*TestFunc)(void);
typedef bool (*TestFunc)();
TestFunc test_funcs[] = {
test_abc,

View File

@ -130,7 +130,7 @@ bool test_const_iteration() {
return test_const_iteration(map);
}
typedef bool (*TestFunc)(void);
typedef bool (*TestFunc)();
TestFunc test_funcs[] = {

View File

@ -1094,7 +1094,7 @@ bool test_35() {
return state;
}
typedef bool (*TestFunc)(void);
typedef bool (*TestFunc)();
TestFunc test_funcs[] = {

View File

@ -46,7 +46,7 @@ typedef struct
void *next;
void *(*constructor)(godot_object *);
void (*destructor)(void *);
const char *(*get_plugin_name)(void);
const char *(*get_plugin_name)();
const char **(*get_supported_extensions)(int *count);
godot_bool (*open_file)(void *, void *); // data struct, and a FileAccess pointer
godot_real (*get_length)(const void *);

View File

@ -79,7 +79,7 @@ int VideoStreamPlaybackTheora::queue_page(ogg_page *page) {
return 0;
}
void VideoStreamPlaybackTheora::video_write(void) {
void VideoStreamPlaybackTheora::video_write() {
th_ycbcr_buffer yuv;
th_decode_ycbcr_out(td, yuv);

View File

@ -63,7 +63,7 @@ class VideoStreamPlaybackTheora : public VideoStreamPlayback {
int buffer_data();
int queue_page(ogg_page *page);
void video_write(void);
void video_write();
float get_time() const;
bool theora_eos;

View File

@ -273,11 +273,11 @@ void ARVRController::set_controller_id(int p_controller_id) {
update_configuration_warning();
};
int ARVRController::get_controller_id(void) const {
int ARVRController::get_controller_id() const {
return controller_id;
};
String ARVRController::get_controller_name(void) const {
String ARVRController::get_controller_name() const {
// get our ARVRServer
ARVRServer *arvr_server = ARVRServer::get_singleton();
ERR_FAIL_NULL_V(arvr_server, String());
@ -475,7 +475,7 @@ void ARVRAnchor::set_anchor_id(int p_anchor_id) {
update_configuration_warning();
};
int ARVRAnchor::get_anchor_id(void) const {
int ARVRAnchor::get_anchor_id() const {
return anchor_id;
};
@ -483,7 +483,7 @@ Vector3 ARVRAnchor::get_size() const {
return size;
};
String ARVRAnchor::get_anchor_name(void) const {
String ARVRAnchor::get_anchor_name() const {
// get our ARVRServer
ARVRServer *arvr_server = ARVRServer::get_singleton();
ERR_FAIL_NULL_V(arvr_server, String());

View File

@ -82,8 +82,8 @@ protected:
public:
void set_controller_id(int p_controller_id);
int get_controller_id(void) const;
String get_controller_name(void) const;
int get_controller_id() const;
String get_controller_name() const;
int get_joystick_id() const;
int is_button_pressed(int p_button) const;
@ -95,7 +95,7 @@ public:
bool get_is_active() const;
ARVRPositionalTracker::TrackerHand get_hand() const;
Ref<Mesh> get_mesh(void) const;
Ref<Mesh> get_mesh() const;
String get_configuration_warning() const;
@ -123,15 +123,15 @@ protected:
public:
void set_anchor_id(int p_anchor_id);
int get_anchor_id(void) const;
String get_anchor_name(void) const;
int get_anchor_id() const;
String get_anchor_name() const;
bool get_is_active() const;
Vector3 get_size() const;
Plane get_plane() const;
Ref<Mesh> get_mesh(void) const;
Ref<Mesh> get_mesh() const;
String get_configuration_warning() const;

View File

@ -146,7 +146,7 @@ float Environment::get_ambient_light_energy() const {
float Environment::get_ambient_light_sky_contribution() const {
return ambient_sky_contribution;
}
int Environment::get_camera_feed_id(void) const {
int Environment::get_camera_feed_id() const {
return camera_feed_id;
}

View File

@ -207,7 +207,7 @@ public:
Color get_ambient_light_color() const;
float get_ambient_light_energy() const;
float get_ambient_light_sky_contribution() const;
int get_camera_feed_id(void) const;
int get_camera_feed_id() const;
void set_tonemapper(ToneMapper p_tone_mapper);
ToneMapper get_tonemapper() const;

View File

@ -66,7 +66,7 @@ PoolVector<String> Theme::_get_stylebox_list(const String &p_node_type) const {
return ilret;
}
PoolVector<String> Theme::_get_stylebox_types(void) const {
PoolVector<String> Theme::_get_stylebox_types() const {
PoolVector<String> ilret;
List<StringName> il;

View File

@ -53,7 +53,7 @@ class Theme : public Resource {
PoolVector<String> _get_icon_list(const String &p_node_type) const;
PoolVector<String> _get_stylebox_list(const String &p_node_type) const;
PoolVector<String> _get_stylebox_types(void) const;
PoolVector<String> _get_stylebox_types() const;
PoolVector<String> _get_font_list(const String &p_node_type) const;
PoolVector<String> _get_color_list(const String &p_node_type) const;
PoolVector<String> _get_constant_list(const String &p_node_type) const;

View File

@ -412,7 +412,7 @@ real_t Generic6DOFJointSW::getAngle(int axis_index) const {
return m_calculatedAxisAngleDiff[axis_index];
}
void Generic6DOFJointSW::calcAnchorPos(void) {
void Generic6DOFJointSW::calcAnchorPos() {
real_t imA = A->get_inv_mass();
real_t imB = B->get_inv_mass();
real_t weight;

View File

@ -363,7 +363,7 @@ public:
return B;
}
virtual void calcAnchorPos(void); // overridable
virtual void calcAnchorPos(); // overridable
void set_param(Vector3::Axis p_axis, PhysicsServer::G6DOFJointAxisParam p_param, real_t p_value);
real_t get_param(Vector3::Axis p_axis, PhysicsServer::G6DOFJointAxisParam p_param) const;

View File

@ -305,7 +305,7 @@ void SliderJointSW::solve(real_t p_step) {
//-----------------------------------------------------------------------------
void SliderJointSW::calculateTransforms(void) {
void SliderJointSW::calculateTransforms() {
m_calculatedTransformA = A->get_transform() * m_frameInA;
m_calculatedTransformB = B->get_transform() * m_frameInB;
m_realPivotAInW = m_calculatedTransformA.origin;
@ -324,7 +324,7 @@ void SliderJointSW::calculateTransforms(void) {
//-----------------------------------------------------------------------------
void SliderJointSW::testLinLimits(void) {
void SliderJointSW::testLinLimits() {
m_solveLinLim = false;
m_linPos = m_depth[0];
if (m_lowerLinLimit <= m_upperLinLimit) {
@ -344,7 +344,7 @@ void SliderJointSW::testLinLimits(void) {
//-----------------------------------------------------------------------------
void SliderJointSW::testAngLimits(void) {
void SliderJointSW::testAngLimits() {
m_angDepth = real_t(0.);
m_solveAngLim = false;
if (m_lowerAngLimit <= m_upperAngLimit) {
@ -364,7 +364,7 @@ void SliderJointSW::testAngLimits(void) {
//-----------------------------------------------------------------------------
Vector3 SliderJointSW::getAncorInA(void) {
Vector3 SliderJointSW::getAncorInA() {
Vector3 ancorInA;
ancorInA = m_realPivotAInW + (m_lowerLinLimit + m_upperLinLimit) * real_t(0.5) * m_sliderAxis;
ancorInA = A->get_transform().inverse().xform(ancorInA);
@ -373,7 +373,7 @@ Vector3 SliderJointSW::getAncorInA(void) {
//-----------------------------------------------------------------------------
Vector3 SliderJointSW::getAncorInB(void) {
Vector3 SliderJointSW::getAncorInB() {
Vector3 ancorInB;
ancorInB = m_frameInB.origin;
return ancorInB;

View File

@ -230,12 +230,12 @@ public:
bool getSolveAngLimit() { return m_solveAngLim; }
real_t getAngDepth() { return m_angDepth; }
// shared code used by ODE solver
void calculateTransforms(void);
void testLinLimits(void);
void testAngLimits(void);
void calculateTransforms();
void testLinLimits();
void testAngLimits();
// access for PE Solver
Vector3 getAncorInA(void);
Vector3 getAncorInB(void);
Vector3 getAncorInA();
Vector3 getAncorInB();
void set_param(PhysicsServer::SliderJointParam p_param, real_t p_value);
real_t get_param(PhysicsServer::SliderJointParam p_param) const;