mirror of
https://github.com/godotengine/godot.git
synced 2025-10-31 21:51:22 +00:00
Add String::remove_char(s) methods for performance and convenience
This commit is contained in:
parent
cae3d722a3
commit
331a43a9d8
35 changed files with 221 additions and 54 deletions
|
|
@ -173,7 +173,7 @@ String OS_LinuxBSD::get_unique_id() const {
|
|||
memset(buf, 0, sizeof(buf));
|
||||
size_t len = sizeof(buf) - 1;
|
||||
if (sysctl(mib, 2, buf, &len, 0x0, 0) != -1) {
|
||||
machine_id = String::utf8(buf).replace("-", "");
|
||||
machine_id = String::utf8(buf).remove_char('-');
|
||||
}
|
||||
#else
|
||||
Ref<FileAccess> f = FileAccess::open("/etc/machine-id", FileAccess::READ);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue