Skip to content

Commit 6f0eb78

Browse files
authored
Merge pull request #893 from Spartan322/merge/a372214
Merge commit godotengine/godot@a372214
2 parents 5c03d04 + 14bb361 commit 6f0eb78

File tree

284 files changed

+6565
-3897
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

284 files changed

+6565
-3897
lines changed

COPYRIGHT.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,11 @@ Comment: Noto Sans font
249249
Copyright: 2012, Google Inc.
250250
License: OFL-1.1
251251

252+
Files: ./thirdparty/fonts/Vazirmatn*.woff2
253+
Comment: Vazirmatn font
254+
Copyright: 2015, The Vazirmatn Project Authors.
255+
License: OFL-1.1
256+
252257
Files: ./thirdparty/freetype/
253258
Comment: The FreeType Project
254259
Copyright: 1996-2023, David Turner, Robert Wilhelm, and Werner Lemberg.

core/config/engine.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,9 @@ String Engine::get_architecture_name() const {
301301
return "ppc";
302302
#endif
303303

304+
#elif defined(__loongarch64)
305+
return "loongarch64";
306+
304307
#elif defined(__wasm__)
305308
#if defined(__wasm64__)
306309
return "wasm64";

core/core_string_names.h

Lines changed: 39 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -36,61 +36,56 @@
3636
#include "core/string/string_name.h"
3737

3838
class CoreStringNames {
39-
friend void register_core_types();
40-
friend void unregister_core_types();
39+
inline static CoreStringNames *singleton = nullptr;
4140

41+
public:
4242
static void create() { singleton = memnew(CoreStringNames); }
4343
static void free() {
4444
memdelete(singleton);
4545
singleton = nullptr;
4646
}
4747

48-
CoreStringNames();
49-
50-
public:
5148
_FORCE_INLINE_ static CoreStringNames *get_singleton() { return singleton; }
5249

53-
static CoreStringNames *singleton;
54-
55-
StringName free_; // "free", conflict with C++ keyword.
56-
StringName changed;
57-
StringName script;
58-
StringName script_changed;
59-
StringName _iter_init;
60-
StringName _iter_next;
61-
StringName _iter_get;
62-
StringName get_rid;
63-
StringName _to_string;
64-
StringName _custom_features;
50+
const StringName free_ = StaticCString::create("free"); // free would conflict with C++ keyword.
51+
const StringName changed = StaticCString::create("changed");
52+
const StringName script = StaticCString::create("script");
53+
const StringName script_changed = StaticCString::create("script_changed");
54+
const StringName _iter_init = StaticCString::create("_iter_init");
55+
const StringName _iter_next = StaticCString::create("_iter_next");
56+
const StringName _iter_get = StaticCString::create("_iter_get");
57+
const StringName get_rid = StaticCString::create("get_rid");
58+
const StringName _to_string = StaticCString::create("_to_string");
59+
const StringName _custom_features = StaticCString::create("_custom_features");
6560

66-
StringName x;
67-
StringName y;
68-
StringName z;
69-
StringName w;
70-
StringName r;
71-
StringName g;
72-
StringName b;
73-
StringName a;
74-
StringName position;
75-
StringName size;
76-
StringName end;
77-
StringName basis;
78-
StringName origin;
79-
StringName normal;
80-
StringName d;
81-
StringName h;
82-
StringName s;
83-
StringName v;
84-
StringName r8;
85-
StringName g8;
86-
StringName b8;
87-
StringName a8;
61+
const StringName x = StaticCString::create("x");
62+
const StringName y = StaticCString::create("y");
63+
const StringName z = StaticCString::create("z");
64+
const StringName w = StaticCString::create("w");
65+
const StringName r = StaticCString::create("r");
66+
const StringName g = StaticCString::create("g");
67+
const StringName b = StaticCString::create("b");
68+
const StringName a = StaticCString::create("a");
69+
const StringName position = StaticCString::create("position");
70+
const StringName size = StaticCString::create("size");
71+
const StringName end = StaticCString::create("end");
72+
const StringName basis = StaticCString::create("basis");
73+
const StringName origin = StaticCString::create("origin");
74+
const StringName normal = StaticCString::create("normal");
75+
const StringName d = StaticCString::create("d");
76+
const StringName h = StaticCString::create("h");
77+
const StringName s = StaticCString::create("s");
78+
const StringName v = StaticCString::create("v");
79+
const StringName r8 = StaticCString::create("r8");
80+
const StringName g8 = StaticCString::create("g8");
81+
const StringName b8 = StaticCString::create("b8");
82+
const StringName a8 = StaticCString::create("a8");
8883

89-
StringName call;
90-
StringName call_deferred;
91-
StringName bind;
92-
StringName notification;
93-
StringName property_list_changed;
84+
const StringName call = StaticCString::create("call");
85+
const StringName call_deferred = StaticCString::create("call_deferred");
86+
const StringName bind = StaticCString::create("bind");
87+
const StringName notification = StaticCString::create("notification");
88+
const StringName property_list_changed = StaticCString::create("property_list_changed");
9489
};
9590

9691
#define CoreStringName(m_name) CoreStringNames::get_singleton()->m_name

core/debugger/remote_debugger_peer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ RemoteDebuggerPeer *RemoteDebuggerPeerTCP::create(const String &p_uri) {
225225
String debug_host = p_uri.replace("tcp://", "");
226226
uint16_t debug_port = 6007;
227227

228-
if (debug_host.contains(":")) {
228+
if (debug_host.contains_char(':')) {
229229
int sep_pos = debug_host.rfind_char(':');
230230
debug_port = debug_host.substr(sep_pos + 1).to_int();
231231
debug_host = debug_host.substr(0, sep_pos);

core/extension/extension_api_dump.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1208,7 +1208,7 @@ Dictionary GDExtensionAPIDump::generate_extension_api(bool p_include_docs) {
12081208
if (F.name.begins_with("_")) {
12091209
continue; //hidden property
12101210
}
1211-
if (F.name.contains("/")) {
1211+
if (F.name.contains_char('/')) {
12121212
// Ignore properties with '/' (slash) in the name. These are only meant for use in the inspector.
12131213
continue;
12141214
}

core/input/input_event.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -756,6 +756,8 @@ Ref<InputEvent> InputEventMouseButton::xformed_by(const Transform2D &p_xform, co
756756
mb->set_factor(factor);
757757
mb->set_button_index(button_index);
758758

759+
mb->merge_meta_from(this);
760+
759761
return mb;
760762
}
761763

@@ -976,6 +978,8 @@ Ref<InputEvent> InputEventMouseMotion::xformed_by(const Transform2D &p_xform, co
976978
mm->set_velocity(p_xform.basis_xform(get_velocity()));
977979
mm->set_screen_velocity(get_screen_velocity());
978980

981+
mm->merge_meta_from(this);
982+
979983
return mm;
980984
}
981985

@@ -1368,6 +1372,8 @@ Ref<InputEvent> InputEventScreenTouch::xformed_by(const Transform2D &p_xform, co
13681372
st->set_canceled(canceled);
13691373
st->set_double_tap(double_tap);
13701374

1375+
st->merge_meta_from(this);
1376+
13711377
return st;
13721378
}
13731379

@@ -1496,6 +1502,8 @@ Ref<InputEvent> InputEventScreenDrag::xformed_by(const Transform2D &p_xform, con
14961502
sd->set_velocity(p_xform.basis_xform(velocity));
14971503
sd->set_screen_velocity(get_screen_velocity());
14981504

1505+
sd->merge_meta_from(this);
1506+
14991507
return sd;
15001508
}
15011509

@@ -1707,6 +1715,8 @@ Ref<InputEvent> InputEventMagnifyGesture::xformed_by(const Transform2D &p_xform,
17071715
ev->set_position(p_xform.xform(get_position() + p_local_ofs));
17081716
ev->set_factor(get_factor());
17091717

1718+
ev->merge_meta_from(this);
1719+
17101720
return ev;
17111721
}
17121722

@@ -1747,6 +1757,8 @@ Ref<InputEvent> InputEventPanGesture::xformed_by(const Transform2D &p_xform, con
17471757
ev->set_position(p_xform.xform(get_position() + p_local_ofs));
17481758
ev->set_delta(get_delta());
17491759

1760+
ev->merge_meta_from(this);
1761+
17501762
return ev;
17511763
}
17521764

core/io/file_access.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,7 @@ bool FileAccess::store_csv_line(const Vector<String> &p_values, const String &p_
742742
for (int i = 0; i < size; ++i) {
743743
String value = p_values[i];
744744

745-
if (value.contains("\"") || value.contains(p_delim) || value.contains("\n")) {
745+
if (value.contains_char('"') || value.contains(p_delim) || value.contains_char('\n')) {
746746
value = "\"" + value.replace("\"", "\"\"") + "\"";
747747
}
748748
if (i < size - 1) {

core/io/file_access_pack.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ void PackedData::add_path(const String &p_pkg_path, const String &p_path, uint64
7373
// Search for directory.
7474
PackedDir *cd = root;
7575

76-
if (simplified_path.contains("/")) { // In a subdirectory.
76+
if (simplified_path.contains_char('/')) { // In a subdirectory.
7777
Vector<String> ds = simplified_path.get_base_dir().split("/");
7878

7979
for (int j = 0; j < ds.size(); j++) {
@@ -106,7 +106,7 @@ void PackedData::remove_path(const String &p_path) {
106106
// Search for directory.
107107
PackedDir *cd = root;
108108

109-
if (simplified_path.contains("/")) { // In a subdirectory.
109+
if (simplified_path.contains_char('/')) { // In a subdirectory.
110110
Vector<String> ds = simplified_path.get_base_dir().split("/");
111111

112112
for (int j = 0; j < ds.size(); j++) {

core/io/ip_address.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ IPAddress::IPAddress(const String &p_string) {
204204
// Wildcard (not a valid IP)
205205
wildcard = true;
206206

207-
} else if (p_string.contains(":")) {
207+
} else if (p_string.contains_char(':')) {
208208
// IPv6
209209
_parse_ipv6(p_string);
210210
valid = true;

core/object/class_db.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1118,7 +1118,7 @@ void ClassDB::bind_integer_constant(const StringName &p_class, const StringName
11181118

11191119
String enum_name = p_enum;
11201120
if (!enum_name.is_empty()) {
1121-
if (enum_name.contains(".")) {
1121+
if (enum_name.contains_char('.')) {
11221122
enum_name = enum_name.get_slicec('.', 1);
11231123
}
11241124

0 commit comments

Comments
 (0)