diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/color.cpp | 2 | ||||
-rw-r--r-- | core/io/stream_peer.cpp | 25 | ||||
-rw-r--r-- | core/object.h | 1 | ||||
-rw-r--r-- | core/ustring.cpp | 3 |
4 files changed, 17 insertions, 14 deletions
diff --git a/core/color.cpp b/core/color.cpp index b708f15d69..a0568d26ed 100644 --- a/core/color.cpp +++ b/core/color.cpp @@ -396,7 +396,7 @@ String Color::to_html(bool p_alpha) const { txt += _to_hex(g); txt += _to_hex(b); if (p_alpha) - txt += _to_hex(a); + txt = _to_hex(a) + txt; return txt; } diff --git a/core/io/stream_peer.cpp b/core/io/stream_peer.cpp index fc00c26889..f6c4948fc3 100644 --- a/core/io/stream_peer.cpp +++ b/core/io/stream_peer.cpp @@ -375,18 +375,18 @@ void StreamPeer::_bind_methods() { ClassDB::bind_method(D_METHOD("set_big_endian", "enable"), &StreamPeer::set_big_endian); ClassDB::bind_method(D_METHOD("is_big_endian_enabled"), &StreamPeer::is_big_endian_enabled); - ClassDB::bind_method(D_METHOD("put_8", "val"), &StreamPeer::put_8); - ClassDB::bind_method(D_METHOD("put_u8", "val"), &StreamPeer::put_u8); - ClassDB::bind_method(D_METHOD("put_16", "val"), &StreamPeer::put_16); - ClassDB::bind_method(D_METHOD("put_u16", "val"), &StreamPeer::put_u16); - ClassDB::bind_method(D_METHOD("put_32", "val"), &StreamPeer::put_32); - ClassDB::bind_method(D_METHOD("put_u32", "val"), &StreamPeer::put_u32); - ClassDB::bind_method(D_METHOD("put_64", "val"), &StreamPeer::put_64); - ClassDB::bind_method(D_METHOD("put_u64", "val"), &StreamPeer::put_u64); - ClassDB::bind_method(D_METHOD("put_float", "val"), &StreamPeer::put_float); - ClassDB::bind_method(D_METHOD("put_double", "val"), &StreamPeer::put_double); - ClassDB::bind_method(D_METHOD("put_utf8_string", "val"), &StreamPeer::put_utf8_string); - ClassDB::bind_method(D_METHOD("put_var", "val"), &StreamPeer::put_var); + ClassDB::bind_method(D_METHOD("put_8", "value"), &StreamPeer::put_8); + ClassDB::bind_method(D_METHOD("put_u8", "value"), &StreamPeer::put_u8); + ClassDB::bind_method(D_METHOD("put_16", "value"), &StreamPeer::put_16); + ClassDB::bind_method(D_METHOD("put_u16", "value"), &StreamPeer::put_u16); + ClassDB::bind_method(D_METHOD("put_32", "value"), &StreamPeer::put_32); + ClassDB::bind_method(D_METHOD("put_u32", "value"), &StreamPeer::put_u32); + ClassDB::bind_method(D_METHOD("put_64", "value"), &StreamPeer::put_64); + ClassDB::bind_method(D_METHOD("put_u64", "value"), &StreamPeer::put_u64); + ClassDB::bind_method(D_METHOD("put_float", "value"), &StreamPeer::put_float); + ClassDB::bind_method(D_METHOD("put_double", "value"), &StreamPeer::put_double); + ClassDB::bind_method(D_METHOD("put_utf8_string", "value"), &StreamPeer::put_utf8_string); + ClassDB::bind_method(D_METHOD("put_var", "value"), &StreamPeer::put_var); ClassDB::bind_method(D_METHOD("get_8"), &StreamPeer::get_8); ClassDB::bind_method(D_METHOD("get_u8"), &StreamPeer::get_u8); @@ -418,7 +418,6 @@ void StreamPeerBuffer::_bind_methods() { ClassDB::bind_method(D_METHOD("duplicate"), &StreamPeerBuffer::duplicate); ADD_PROPERTY(PropertyInfo(Variant::POOL_BYTE_ARRAY, "data_array"), "set_data_array", "get_data_array"); - } Error StreamPeerBuffer::put_data(const uint8_t *p_data, int p_bytes) { diff --git a/core/object.h b/core/object.h index 75800acaa7..8306b5a356 100644 --- a/core/object.h +++ b/core/object.h @@ -86,6 +86,7 @@ enum PropertyHint { PROPERTY_HINT_PROPERTY_OF_SCRIPT, ///< a property of a script & base PROPERTY_HINT_OBJECT_TOO_BIG, ///< object is too big to send PROPERTY_HINT_MAX, + // When updating PropertyHint, also sync the hardcoded list in VisualScriptEditorVariableEdit }; enum PropertyUsageFlags { diff --git a/core/ustring.cpp b/core/ustring.cpp index 1be828c44a..1fce4f1826 100644 --- a/core/ustring.cpp +++ b/core/ustring.cpp @@ -686,6 +686,9 @@ Vector<String> String::split_spaces() const { int from = 0; int i = 0; int len = length(); + if (len == 0) + return ret; + bool inside = false; while (true) { |