diff options
author | Juan Linietsky <reduzio@gmail.com> | 2016-08-22 01:14:08 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2016-08-22 01:19:24 -0300 |
commit | cbbcf727035c8b481889f605337a96a9e58ed970 (patch) | |
tree | 2981840c23b2c6e7458b18af14ddb70b66270c15 /core/string_db.cpp | |
parent | 61cb8fd76c78ce2d27b5738e84c773ae4ec284e1 (diff) | |
download | redot-engine-cbbcf727035c8b481889f605337a96a9e58ed970.tar.gz |
-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
Diffstat (limited to 'core/string_db.cpp')
-rw-r--r-- | core/string_db.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/core/string_db.cpp b/core/string_db.cpp index 9a693f88e9..bf92c4eac4 100644 --- a/core/string_db.cpp +++ b/core/string_db.cpp @@ -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(); |