1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Merge pull request #99799 from akien-mga/fix-typos

Fix various typos and code style issues
This commit is contained in:
Rémi Verschelde
2024-11-29 22:02:53 +01:00
23 changed files with 116 additions and 114 deletions

View File

@@ -1879,7 +1879,7 @@ void GDScriptByteCodeGenerator::end_block() {
void GDScriptByteCodeGenerator::clear_temporaries() {
for (int slot_idx : temporaries_pending_clear) {
// The temporary may have been re-used as something else since it was added to the list.
// The temporary may have been reused as something else since it was added to the list.
// In that case, there's **no** need to clear it.
if (temporaries[slot_idx].can_contain_object) {
clear_address(Address(Address::TEMPORARY, slot_idx)); // Can contain `RefCounted`, so clear it.
@@ -1928,7 +1928,7 @@ void GDScriptByteCodeGenerator::clear_address(const Address &p_address) {
}
}
// Returns `true` if the local has been re-used and not cleaned up with `clear_address()`.
// Returns `true` if the local has been reused and not cleaned up with `clear_address()`.
bool GDScriptByteCodeGenerator::is_local_dirty(const Address &p_address) const {
ERR_FAIL_COND_V(p_address.mode != Address::LOCAL_VARIABLE, false);
return dirty_locals.has(p_address.address);

View File

@@ -2188,7 +2188,7 @@ Error GDScriptCompiler::_parse_block(CodeGen &codegen, const GDScriptParser::Sui
initialized = true;
} else if ((local_type.has_type && local_type.kind == GDScriptDataType::BUILTIN) || codegen.generator->is_local_dirty(local)) {
// Initialize with default for the type. Built-in types must always be cleared (they cannot be `null`).
// Objects and untyped variables are assigned to `null` only if the stack address has been re-used and not cleared.
// Objects and untyped variables are assigned to `null` only if the stack address has been reused and not cleared.
codegen.generator->clear_address(local);
initialized = true;
}