aboutsummaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorLoïc Blot <nerzhul@users.noreply.github.com>2017-08-20 13:30:50 +0200
committerGitHub <noreply@github.com>2017-08-20 13:30:50 +0200
commit1c1c97cbd1d7913ac12bf550ec02c97f843a0fd3 (patch)
tree03dd0c39e323c7f0b1f06014ff30e74f429bfa01 /src/network
parent50669cd2822a11570ae462972194eeb2d585a8c1 (diff)
downloadminetest-1c1c97cbd1d7913ac12bf550ec02c97f843a0fd3.tar.gz
minetest-1c1c97cbd1d7913ac12bf550ec02c97f843a0fd3.tar.bz2
minetest-1c1c97cbd1d7913ac12bf550ec02c97f843a0fd3.zip
Modernize source code: last part (#6285)
* Modernize source code: last par * Use empty when needed * Use emplace_back instead of push_back when needed * For range-based loops * Initializers fixes * constructors, destructors default * c++ C stl includes
Diffstat (limited to 'src/network')
-rw-r--r--src/network/connection.cpp2
-rw-r--r--src/network/connection.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/network/connection.cpp b/src/network/connection.cpp
index a74e96784..77ce34bfd 100644
--- a/src/network/connection.cpp
+++ b/src/network/connection.cpp
@@ -1281,7 +1281,7 @@ bool ConnectionSendThread::packetsQueued()
continue;
for (Channel &channel : (dynamic_cast<UDPPeer *>(&peer))->channels) {
- if (channel.queued_commands.size() > 0) {
+ if (!channel.queued_commands.empty()) {
return true;
}
}
diff --git a/src/network/connection.h b/src/network/connection.h
index c64272035..c0a39f313 100644
--- a/src/network/connection.h
+++ b/src/network/connection.h
@@ -604,7 +604,7 @@ public:
class PeerHelper
{
public:
- PeerHelper() = default;;
+ PeerHelper() = default;
PeerHelper(Peer* peer);
~PeerHelper();