virtualx-engine/core/io
Fabio Alessandrelli cbc772d696 Fix buffers size calculation in PacketPeerStream.
The calculation used to be wrong when exactly at a power of 2.
`nearest_shift` always return the "next" power of 2
`nearest_shift(4) == 3 # 2^3 = 8`.

On the other hand `next_power_of_2` returns the exact value if that
value is a power of 2 (i.e. `next_power_of_2(4) == 4`).

I.e. :
```
WARN_PRINT(itos(next_power_of_2(4)) + " " + itos(1 << nearest_shift(4)));
// WARNING: ... : 4 8
```

Is this by design?
2019-12-22 15:35:44 +01:00
..
compression.cpp Compression: Set Zstd max window size via public parameter 2019-04-18 13:47:42 +02:00
compression.h Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
config_file.cpp Added a method to erase section key in ConfigFile 2019-10-07 18:11:19 -03:00
config_file.h Added a method to erase section key in ConfigFile 2019-10-07 18:11:19 -03:00
file_access_buffered.cpp Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in 'core/' and 'editor/' 2019-08-17 12:33:15 +02:00
file_access_buffered.h Core: Ensure classes match their header filename 2019-02-12 13:34:25 +01:00
file_access_buffered_fa.h Replace last occurrences of 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' 2019-08-17 13:31:22 +02:00
file_access_compressed.cpp Added some obvious errors explanations 2019-09-25 10:28:50 +02:00
file_access_compressed.h Add FileAccess::set_unix_permissions for Unix platforms 2019-04-07 15:45:30 -03:00
file_access_encrypted.cpp Merge pull request #32051 from qarmin/some_error_explanation 2019-09-25 11:51:54 +02:00
file_access_encrypted.h Implemented get_path() & get_path_absolute() for FileAccessEncrypted 2019-09-07 19:22:33 +02:00
file_access_memory.cpp Added some obvious errors explanations 2019-09-25 10:28:50 +02:00
file_access_memory.h Add FileAccess::set_unix_permissions for Unix platforms 2019-04-07 15:45:30 -03:00
file_access_network.cpp Added some obvious errors explanations 2019-09-25 10:28:50 +02:00
file_access_network.h Add FileAccess::set_unix_permissions for Unix platforms 2019-04-07 15:45:30 -03:00
file_access_pack.cpp Fix small memory leak in PackedSourcePCK::try_open_pack 2019-10-03 19:45:41 +02:00
file_access_pack.h Add flag to control the replacement of files by ProjectSettings.load_resource_pack 2019-09-25 15:29:59 +02:00
file_access_zip.cpp Merge pull request #32291 from Dragoncraft89/add_load_resource_flag 2019-09-25 16:30:01 +02:00
file_access_zip.h Add flag to control the replacement of files by ProjectSettings.load_resource_pack 2019-09-25 15:29:59 +02:00
http_client.cpp Merge pull request #33640 from mewin/http_head_request 2019-12-01 05:50:33 +01:00
http_client.h Merge pull request #33640 from mewin/http_head_request 2019-12-01 05:50:33 +01:00
image_loader.cpp Added some obvious errors explanations 2019-09-25 10:28:50 +02:00
image_loader.h Remove redundant author doc comments 2019-08-12 04:26:38 -05:00
ip.cpp Added some obvious errors explanations 2019-09-25 10:28:50 +02:00
ip.h Implement IP.get_local_interfaces. 2019-06-21 00:14:42 +02:00
ip_address.cpp Added some obvious errors explanations 2019-09-25 10:28:50 +02:00
ip_address.h Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
json.cpp Remove unnecessary code and add some error explanations 2019-07-01 12:59:42 +02:00
json.h Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
logger.cpp Fix parameterised macros in core. Addresses #25488 2019-02-18 22:08:42 +05:30
logger.h Fix -Wsuggest-attribute=format warnings. 2019-02-27 06:56:50 +01:00
marshalls.cpp Added some obvious errors explanations 2019-09-25 10:28:50 +02:00
marshalls.h Use same boolean for objects encode and decode. 2019-03-28 10:43:34 +01:00
multiplayer_api.cpp MultiplayerAPI cleanup cache when peer disconnects 2019-10-25 18:03:58 +02:00
multiplayer_api.h Add network profiler 2019-09-05 09:48:36 +02:00
net_socket.cpp Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
net_socket.h NetSocket set_broadcast_enabled returns Error enum 2019-12-10 12:11:52 +01:00
networked_multiplayer_peer.cpp Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
networked_multiplayer_peer.h Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
packet_peer.cpp Fix buffers size calculation in PacketPeerStream. 2019-12-22 15:35:44 +01:00
packet_peer.h Add object encoding param to serialization methods 2019-04-01 15:53:19 +02:00
packet_peer_udp.cpp UDP sockets broadcast is now disabled by default. 2019-12-14 17:48:16 +01:00
packet_peer_udp.h UDP sockets broadcast is now disabled by default. 2019-12-14 17:48:16 +01:00
pck_packer.cpp Make some arguments in PCKPacker methods optional 2019-12-07 01:06:42 +01:00
pck_packer.h Make some arguments in PCKPacker methods optional 2019-12-07 01:06:42 +01:00
resource_format_binary.cpp Added some obvious errors explanations 2019-09-25 10:28:50 +02:00
resource_format_binary.h Unexpose subclasses of ResourceFormatLoader and -Saver 2019-06-18 17:56:23 +02:00
resource_importer.cpp Remove unnecessary code and add some error explanations 2019-07-01 12:59:42 +02:00
resource_importer.h Made use of semicolons more consitent, fixed formatting 2019-06-19 15:24:31 +02:00
resource_loader.cpp ResourceLoader: Add language code matching for localized resources 2019-12-04 16:53:40 +01:00
resource_loader.h Remove redundant author doc comments 2019-08-12 04:26:38 -05:00
resource_saver.cpp Added some obvious errors explanations 2019-09-25 10:28:50 +02:00
resource_saver.h Remove redundant author doc comments 2019-08-12 04:26:38 -05:00
SCsub SCons: Build core's thirdparty code in own environment 2018-09-28 11:40:41 +02:00
stream_peer.cpp Added some obvious errors explanations 2019-09-25 10:28:50 +02:00
stream_peer.h Add object encoding param to serialization methods 2019-04-01 15:53:19 +02:00
stream_peer_ssl.cpp Rewrite StreamPeerSSL with SSLContext helper class 2019-08-21 16:59:38 +02:00
stream_peer_ssl.h Rewrite StreamPeerSSL with SSLContext helper class 2019-08-21 16:59:38 +02:00
stream_peer_tcp.cpp Update stream_peer_tcp.cpp 2019-09-25 23:45:32 +01:00
stream_peer_tcp.h Add TCP connect timeout. 2019-07-08 09:18:46 +02:00
tcp_server.cpp Add TCP Server is_listening method 2019-07-03 18:42:46 +02:00
tcp_server.h Add TCP Server is_listening method 2019-07-03 18:42:46 +02:00
translation_loader_po.cpp Added some obvious errors explanations 2019-09-25 10:28:50 +02:00
translation_loader_po.h Unexpose subclasses of ResourceFormatLoader and -Saver 2019-06-18 17:56:23 +02:00
xml_parser.cpp Added some obvious errors explanations 2019-09-25 10:28:50 +02:00
xml_parser.h Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
zip_io.cpp Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
zip_io.h Fix typos with codespell 2019-05-19 13:10:35 +02:00