summaryrefslogtreecommitdiffstats
path: root/modules/enet/networked_multiplayer_enet.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-11-25 00:07:54 -0300
committerJuan Linietsky <reduzio@gmail.com>2017-11-25 00:09:40 -0300
commitbc2e8d99e5ae0dbd69e712cc71da3033f5f30139 (patch)
treed836011e3d5873e3ceea328ea3100f3c7719ab99 /modules/enet/networked_multiplayer_enet.cpp
parent7dfba3cda9f13427f9f10a6eefbec52aef62274c (diff)
downloadredot-engine-bc2e8d99e5ae0dbd69e712cc71da3033f5f30139.tar.gz
Made Vector::ptrw explicit for writing, compiler was sometimes using the wrong function,
leading to unnecesary copy on writes and reduced performance.
Diffstat (limited to 'modules/enet/networked_multiplayer_enet.cpp')
-rw-r--r--modules/enet/networked_multiplayer_enet.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/enet/networked_multiplayer_enet.cpp b/modules/enet/networked_multiplayer_enet.cpp
index 1e18ec0d18..ce485956b4 100644
--- a/modules/enet/networked_multiplayer_enet.cpp
+++ b/modules/enet/networked_multiplayer_enet.cpp
@@ -585,7 +585,7 @@ size_t NetworkedMultiplayerENet::enet_compress(void *context, const ENetBuffer *
if (enet->dst_compressor_mem.size() < req_size) {
enet->dst_compressor_mem.resize(req_size);
}
- int ret = Compression::compress(enet->dst_compressor_mem.ptr(), enet->src_compressor_mem.ptr(), ofs, mode);
+ int ret = Compression::compress(enet->dst_compressor_mem.ptrw(), enet->src_compressor_mem.ptr(), ofs, mode);
if (ret < 0)
return 0;