summaryrefslogtreecommitdiffstats
path: root/core/project_settings.cpp
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2019-03-26 16:52:42 +0100
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2019-04-01 15:53:19 +0200
commit393e62b98a5a37ccdd7d860571e2f8cc7b970fe4 (patch)
tree321d68ad0d4c0037b4ec46e5b5b5fbc09281f222 /core/project_settings.cpp
parent53ab3a1ba92237a15ce74b7b35ce78c1defbfa47 (diff)
downloadredot-engine-393e62b98a5a37ccdd7d860571e2f8cc7b970fe4.tar.gz
Add object encoding param to serialization methods
Network peers get_var/put_var File get_var/store_var GDScript/Mono/VisualScript bytes2var/var2bytes Add MultiplayerAPI.allow_object_decoding member which deprecates PacketPeer.allow_object_decoding. Break ABI compatibaility (API compatibility for GDNative).
Diffstat (limited to 'core/project_settings.cpp')
-rw-r--r--core/project_settings.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/core/project_settings.cpp b/core/project_settings.cpp
index 02c7c9e029..8c9a3dbcd4 100644
--- a/core/project_settings.cpp
+++ b/core/project_settings.cpp
@@ -501,7 +501,7 @@ Error ProjectSettings::_load_settings_binary(const String p_path) {
d.resize(vlen);
f->get_buffer(d.ptrw(), vlen);
Variant value;
- err = decode_variant(value, d.ptr(), d.size());
+ err = decode_variant(value, d.ptr(), d.size(), NULL, false);
ERR_EXPLAIN("Error decoding property: " + key);
ERR_CONTINUE(err != OK);
set(key, value);
@@ -656,7 +656,7 @@ Error ProjectSettings::_save_settings_binary(const String &p_file, const Map<Str
file->store_string(key);
int len;
- err = encode_variant(p_custom_features, NULL, len);
+ err = encode_variant(p_custom_features, NULL, len, false);
if (err != OK) {
memdelete(file);
ERR_FAIL_V(err);
@@ -665,7 +665,7 @@ Error ProjectSettings::_save_settings_binary(const String &p_file, const Map<Str
Vector<uint8_t> buff;
buff.resize(len);
- err = encode_variant(p_custom_features, buff.ptrw(), len);
+ err = encode_variant(p_custom_features, buff.ptrw(), len, false);
if (err != OK) {
memdelete(file);
ERR_FAIL_V(err);
@@ -694,7 +694,7 @@ Error ProjectSettings::_save_settings_binary(const String &p_file, const Map<Str
file->store_string(key);
int len;
- err = encode_variant(value, NULL, len);
+ err = encode_variant(value, NULL, len, false);
if (err != OK)
memdelete(file);
ERR_FAIL_COND_V(err != OK, ERR_INVALID_DATA);
@@ -702,7 +702,7 @@ Error ProjectSettings::_save_settings_binary(const String &p_file, const Map<Str
Vector<uint8_t> buff;
buff.resize(len);
- err = encode_variant(value, buff.ptrw(), len);
+ err = encode_variant(value, buff.ptrw(), len, false);
if (err != OK)
memdelete(file);
ERR_FAIL_COND_V(err != OK, ERR_INVALID_DATA);