[Core] Fix sorting of Dictionary keys
`StringName` keys were sorted as `StringName` which is unstable.
This commit is contained in:
parent
04692d83cb
commit
79f654ced5
5 changed files with 20 additions and 8 deletions
|
|
@ -2245,7 +2245,7 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str
|
|||
} else {
|
||||
List<Variant> keys;
|
||||
dict.get_key_list(&keys);
|
||||
keys.sort();
|
||||
keys.sort_custom<StringLikeVariantOrder>();
|
||||
|
||||
if (keys.is_empty()) {
|
||||
// Avoid unnecessary line break.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue