Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C++11 cleanup on constructors dir network #6021

Merged
merged 4 commits into from Jun 21, 2017

Conversation

Dumbeldor
Copy link
Contributor

No description provided.

@@ -2031,8 +1981,7 @@ void ConnectionSendThread::sendAsPacket(u16 peer_id, u8 channelnum,
}

ConnectionReceiveThread::ConnectionReceiveThread(unsigned int max_packet_size) :
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

max_packet_size isn't used, I remove it or can it be used in the near future?

@nerzhul nerzhul added the Maintenance Tasks to keep the codebase and related parts in order, including architectural improvements label Jun 20, 2017
@@ -625,7 +628,7 @@ class PeerHelper
bool operator!=(void* ptr);

private:
Peer* m_peer;
Peer* m_peer = 0;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nullptr & check if NULL is tested on this variable

@@ -758,16 +748,21 @@ class Peer {
float min_rtt;
float max_rtt;
float avg_rtt;

rttstats(float jitter_min_ = FLT_MAX, float jitter_max_ = 0.0f, float jitter_avg_ = -1.0f,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is that ?

@@ -812,7 +812,7 @@ void Channel::UpdateTimers(float dtime,bool legacy_peer)
PeerHelper::PeerHelper(Peer* peer) :
m_peer(peer)
{
if (peer != NULL)
if (peer)
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please fix braces too

@Zeno-
Copy link
Contributor

Zeno- commented Jun 21, 2017

👍 pending braces being fixed

@nerzhul nerzhul merged commit 8daf5b5 into minetest:master Jun 21, 2017
@nerzhul nerzhul added this to Done in Minetest C++11 Jun 25, 2017
osjc pushed a commit to osjc/minetest that referenced this pull request Jan 11, 2019
* C++11 cleanup on constructors dir network
osjc pushed a commit to osjc/minetest that referenced this pull request Jan 23, 2019
* C++11 cleanup on constructors dir network
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Maintenance Tasks to keep the codebase and related parts in order, including architectural improvements One approval ✅ ◻️
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants