Skip to content

Commit

Permalink
Style: Remove redundant void argument lists
Browse files Browse the repository at this point in the history
  • Loading branch information
akien-mga committed May 4, 2021
1 parent b4af1eb commit 0c8b5b5
Show file tree
Hide file tree
Showing 17 changed files with 33 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion main/tests/test_astar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ bool test_solutions() {
return true;
}

typedef bool (*TestFunc)(void);
typedef bool (*TestFunc)();

TestFunc test_funcs[] = {
test_abc,
Expand Down
2 changes: 1 addition & 1 deletion main/tests/test_ordered_hash_map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ bool test_const_iteration() {
return test_const_iteration(map);
}

typedef bool (*TestFunc)(void);
typedef bool (*TestFunc)();

TestFunc test_funcs[] = {

Expand Down
2 changes: 1 addition & 1 deletion main/tests/test_string.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1094,7 +1094,7 @@ bool test_35() {
return state;
}

typedef bool (*TestFunc)(void);
typedef bool (*TestFunc)();

TestFunc test_funcs[] = {

Expand Down
2 changes: 1 addition & 1 deletion modules/gdnative/include/videodecoder/godot_videodecoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 *);
Expand Down
2 changes: 1 addition & 1 deletion modules/theora/video_stream_theora.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion modules/theora/video_stream_theora.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions scene/3d/arvr_nodes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down Expand Up @@ -475,15 +475,15 @@ 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;
};

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());
Expand Down
12 changes: 6 additions & 6 deletions scene/3d/arvr_nodes.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ class ARVRController : public Spatial {

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;
Expand All @@ -95,7 +95,7 @@ class ARVRController : public Spatial {
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;

Expand Down Expand Up @@ -123,15 +123,15 @@ class ARVRAnchor : public Spatial {

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;

Expand Down
2 changes: 1 addition & 1 deletion scene/resources/environment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion scene/resources/environment.h
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ class Environment : public Resource {
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;
Expand Down
2 changes: 1 addition & 1 deletion scene/resources/theme.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion scene/resources/theme.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion servers/physics/joints/generic_6dof_joint_sw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion servers/physics/joints/generic_6dof_joint_sw.h
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ class Generic6DOFJointSW : public JointSW {
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;
Expand Down
10 changes: 5 additions & 5 deletions servers/physics/joints/slider_joint_sw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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) {
Expand All @@ -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) {
Expand All @@ -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);
Expand All @@ -373,7 +373,7 @@ Vector3 SliderJointSW::getAncorInA(void) {

//-----------------------------------------------------------------------------

Vector3 SliderJointSW::getAncorInB(void) {
Vector3 SliderJointSW::getAncorInB() {
Vector3 ancorInB;
ancorInB = m_frameInB.origin;
return ancorInB;
Expand Down
10 changes: 5 additions & 5 deletions servers/physics/joints/slider_joint_sw.h
Original file line number Diff line number Diff line change
Expand Up @@ -230,12 +230,12 @@ class SliderJointSW : public JointSW {
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;
Expand Down

0 comments on commit 0c8b5b5

Please sign in to comment.