Skip to content

Commit

Permalink
Soft-deprecate the use of implicit reliance on NULL-terminated strings.
Browse files Browse the repository at this point in the history
This is toggled with the c++-define GODOT_SHOW_STR_DEPRECATIONS. For unowned string references, StrRange can be used. This is employed in sprintf and operator+, to avoid unnecessary allocations wherever possible.
  • Loading branch information
Ivorforce committed Nov 28, 2024
1 parent f128f38 commit 1b8e3da
Show file tree
Hide file tree
Showing 9 changed files with 563 additions and 563 deletions.
3 changes: 2 additions & 1 deletion core/io/plist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,8 @@ void PListNode::store_text(String &p_stream, uint8_t p_indent) const {
p_stream += String("\t").repeat(p_indent);
p_stream += "<data>\n";
p_stream += String("\t").repeat(p_indent);
p_stream += data_string + "\n";
p_stream += data_string;
p_stream += "\n";
p_stream += String("\t").repeat(p_indent);
p_stream += "</data>\n";
} break;
Expand Down
Loading

0 comments on commit 1b8e3da

Please sign in to comment.