Merge pull request #82779 from emacser0/typo

Fix some typos in source
This commit is contained in:
Rémi Verschelde 2023-10-04 15:46:29 +02:00
commit bfd78bb917
No known key found for this signature in database
GPG Key ID: C3336907360768E1
3 changed files with 7 additions and 7 deletions

View File

@ -113,7 +113,7 @@ public:
// GDScript keywords. // GDScript keywords.
RegEx keyword_gdscript_tool = RegEx("^tool"); RegEx keyword_gdscript_tool = RegEx("^tool");
RegEx keyword_gdscript_export_single = RegEx("^export"); RegEx keyword_gdscript_export_single = RegEx("^export");
RegEx keyword_gdscript_export_mutli = RegEx("([\t]+)export\\b"); RegEx keyword_gdscript_export_multi = RegEx("([\t]+)export\\b");
RegEx keyword_gdscript_onready = RegEx("^onready"); RegEx keyword_gdscript_onready = RegEx("^onready");
RegEx keyword_gdscript_remote = RegEx("^remote func"); RegEx keyword_gdscript_remote = RegEx("^remote func");
RegEx keyword_gdscript_remotesync = RegEx("^remotesync func"); RegEx keyword_gdscript_remotesync = RegEx("^remotesync func");
@ -2548,7 +2548,7 @@ void ProjectConverter3To4::rename_gdscript_keywords(Vector<SourceLine> &source_l
line = reg_container.keyword_gdscript_export_single.sub(line, "@export", true); line = reg_container.keyword_gdscript_export_single.sub(line, "@export", true);
} }
if (line.contains("export")) { if (line.contains("export")) {
line = reg_container.keyword_gdscript_export_mutli.sub(line, "$1@export", true); line = reg_container.keyword_gdscript_export_multi.sub(line, "$1@export", true);
} }
if (line.contains("onready")) { if (line.contains("onready")) {
line = reg_container.keyword_gdscript_onready.sub(line, "@onready", true); line = reg_container.keyword_gdscript_onready.sub(line, "@onready", true);
@ -2607,7 +2607,7 @@ Vector<String> ProjectConverter3To4::check_for_rename_gdscript_keywords(Vector<S
if (line.contains("export")) { if (line.contains("export")) {
old = line; old = line;
line = reg_container.keyword_gdscript_export_mutli.sub(line, "@export", true); line = reg_container.keyword_gdscript_export_multi.sub(line, "@export", true);
if (old != line) { if (old != line) {
found_renames.append(line_formatter(current_line, "export", "@export", line)); found_renames.append(line_formatter(current_line, "export", "@export", line));
} }

View File

@ -167,7 +167,7 @@ Error ImageLoaderBMP::convert_to_image(Ref<Image> p_image,
// Next we apply some color scaling going from a variable value space to a 256 value space. // Next we apply some color scaling going from a variable value space to a 256 value space.
// This may be simplified some but left as is for legibility. // This may be simplified some but left as is for legibility.
// float scaled_value = unscaled_value * byte_max_value / color_channel_maxium_value + rounding_offset; // float scaled_value = unscaled_value * byte_max_value / color_channel_maximum_value + rounding_offset;
float f0 = b0 * 255.0f / static_cast<float>(p_header.bmp_bitfield.red_max) + 0.5f; float f0 = b0 * 255.0f / static_cast<float>(p_header.bmp_bitfield.red_max) + 0.5f;
float f1 = b1 * 255.0f / static_cast<float>(p_header.bmp_bitfield.green_max) + 0.5f; float f1 = b1 * 255.0f / static_cast<float>(p_header.bmp_bitfield.green_max) + 0.5f;
float f2 = b2 * 255.0f / static_cast<float>(p_header.bmp_bitfield.blue_max) + 0.5f; float f2 = b2 * 255.0f / static_cast<float>(p_header.bmp_bitfield.blue_max) + 0.5f;

View File

@ -60,10 +60,10 @@ String _remove_symlink(const String &dir) {
// Change directory to the external data directory. // Change directory to the external data directory.
chdir(dir.utf8().get_data()); chdir(dir.utf8().get_data());
// Get the actual directory without the potential symlink. // Get the actual directory without the potential symlink.
char dir_name_wihout_symlink[2048]; char dir_name_without_symlink[2048];
getcwd(dir_name_wihout_symlink, 2048); getcwd(dir_name_without_symlink, 2048);
// Convert back to a String. // Convert back to a String.
String dir_without_symlink(dir_name_wihout_symlink); String dir_without_symlink(dir_name_without_symlink);
// Restore original current directory. // Restore original current directory.
chdir(current_dir_name); chdir(current_dir_name);
return dir_without_symlink; return dir_without_symlink;