aboutsummaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorJosiahWI <41302989+JosiahWI@users.noreply.github.com>2021-12-28 07:05:49 -0600
committerGitHub <noreply@github.com>2021-12-28 14:05:49 +0100
commit7f6306ca964ac5b9245c433e3b688c5d4ee08c35 (patch)
treecc51c06da9b439ecf21d57e797211975f7b35885 /src/network
parent0c4929f0252811d9715b96379973929053d32ef0 (diff)
downloadminetest-7f6306ca964ac5b9245c433e3b688c5d4ee08c35.tar.gz
minetest-7f6306ca964ac5b9245c433e3b688c5d4ee08c35.tar.bz2
minetest-7f6306ca964ac5b9245c433e3b688c5d4ee08c35.zip
Restore GCC 5 compatibility (#11778)
Diffstat (limited to 'src/network')
-rw-r--r--src/network/clientpackethandler.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/network/clientpackethandler.cpp b/src/network/clientpackethandler.cpp
index d20a80fb7..6aececa7f 100644
--- a/src/network/clientpackethandler.cpp
+++ b/src/network/clientpackethandler.cpp
@@ -43,6 +43,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "tileanimation.h"
#include "gettext.h"
#include "skyparams.h"
+#include <memory>
void Client::handleCommand_Deprecated(NetworkPacket* pkt)
{
@@ -1559,7 +1560,7 @@ void Client::handleCommand_MediaPush(NetworkPacket *pkt)
m_media_pushed_files.insert(filename);
// create a downloader for this file
- auto downloader = new SingleMediaDownloader(cached);
+ auto downloader(std::make_shared<SingleMediaDownloader>(cached));
m_pending_media_downloads.emplace_back(token, downloader);
downloader->addFile(filename, raw_hash);
for (const auto &baseurl : m_remote_media_servers)