-High Level protocol optimization (should be smaller)

-Ability to set compression to ENet packets (check API)
-Fixed small bug in StringDB that lead to duplicate empty strings
-Added a new class, StreamPeerBuffer, useful to create your own tightly packed data
This commit is contained in:
Juan Linietsky
2016-08-22 01:14:08 -03:00
parent 61cb8fd76c
commit cbbcf72703
12 changed files with 515 additions and 85 deletions

View File

@ -183,7 +183,8 @@ StringName::StringName(const char *p_name) {
ERR_FAIL_COND(!configured);
ERR_FAIL_COND( !p_name || !p_name[0]);
if (!p_name || p_name[0]==0)
return; //empty, ignore
_global_lock();
@ -288,6 +289,9 @@ StringName::StringName(const String& p_name) {
ERR_FAIL_COND(!configured);
if (p_name==String())
return;
_global_lock();
uint32_t hash = p_name.hash();