diff options
Diffstat (limited to 'core/os')
-rw-r--r-- | core/os/dir_access.cpp | 8 | ||||
-rw-r--r-- | core/os/file_access.cpp | 22 | ||||
-rw-r--r-- | core/os/os.cpp | 22 | ||||
-rw-r--r-- | core/os/thread.cpp | 2 | ||||
-rw-r--r-- | core/os/thread_dummy.cpp | 8 |
5 files changed, 31 insertions, 31 deletions
diff --git a/core/os/dir_access.cpp b/core/os/dir_access.cpp index 9f2672e038..5e1cb8ea29 100644 --- a/core/os/dir_access.cpp +++ b/core/os/dir_access.cpp @@ -131,7 +131,7 @@ Error DirAccess::erase_contents_recursive() { Error DirAccess::make_dir_recursive(String p_dir) { if (p_dir.length() < 1) { return OK; - }; + } String full_dir; @@ -185,7 +185,7 @@ String DirAccess::fix_path(String p_path) const { String resource_path = ProjectSettings::get_singleton()->get_resource_path(); if (resource_path != "") { return p_path.replace_first("res:/", resource_path); - }; + } return p_path.replace_first("res://", ""); } } @@ -196,7 +196,7 @@ String DirAccess::fix_path(String p_path) const { String data_dir = OS::get_singleton()->get_user_data_dir(); if (data_dir != "") { return p_path.replace_first("user:/", data_dir); - }; + } return p_path.replace_first("user://", ""); } @@ -249,7 +249,7 @@ DirAccess *DirAccess::create(AccessType p_access) { } return da; -}; +} String DirAccess::get_full_path(const String &p_path, AccessType p_access) { DirAccess *d = DirAccess::create(p_access); diff --git a/core/os/file_access.cpp b/core/os/file_access.cpp index f9ba8ff2d2..20b3435911 100644 --- a/core/os/file_access.cpp +++ b/core/os/file_access.cpp @@ -65,7 +65,7 @@ bool FileAccess::exists(const String &p_name) { void FileAccess::_set_access_type(AccessType p_access) { _access_type = p_access; -}; +} FileAccess *FileAccess::create_for_path(const String &p_path) { FileAccess *ret = nullptr; @@ -83,7 +83,7 @@ FileAccess *FileAccess::create_for_path(const String &p_path) { Error FileAccess::reopen(const String &p_path, int p_mode_flags) { return _open(p_path, p_mode_flags); -}; +} FileAccess *FileAccess::open(const String &p_path, int p_mode_flags, Error *r_error) { //try packed data first @@ -115,7 +115,7 @@ FileAccess *FileAccess::open(const String &p_path, int p_mode_flags, Error *r_er FileAccess::CreateFunc FileAccess::get_create_func(AccessType p_access) { return create_func[p_access]; -}; +} String FileAccess::fix_path(const String &p_path) const { //helper used by file accesses that use a single filesystem @@ -129,7 +129,7 @@ String FileAccess::fix_path(const String &p_path) const { String resource_path = ProjectSettings::get_singleton()->get_resource_path(); if (resource_path != "") { return r_path.replace("res:/", resource_path); - }; + } return r_path.replace("res://", ""); } } @@ -140,7 +140,7 @@ String FileAccess::fix_path(const String &p_path) const { String data_dir = OS::get_singleton()->get_user_data_dir(); if (data_dir != "") { return r_path.replace("user:/", data_dir); - }; + } return r_path.replace("user://", ""); } @@ -215,7 +215,7 @@ float FileAccess::get_float() const { MarshallFloat m; m.i = get_32(); return m.f; -}; +} real_t FileAccess::get_real() const { if (real_is_double) { @@ -229,7 +229,7 @@ double FileAccess::get_double() const { MarshallDouble m; m.l = get_64(); return m.d; -}; +} String FileAccess::get_token() const { CharString token; @@ -447,13 +447,13 @@ void FileAccess::store_float(float p_dest) { MarshallFloat m; m.f = p_dest; store_32(m.i); -}; +} void FileAccess::store_double(double p_dest) { MarshallDouble m; m.d = p_dest; store_64(m.l); -}; +} uint64_t FileAccess::get_modified_time(const String &p_file) { if (PackedData::get_singleton() && !PackedData::get_singleton()->is_disabled() && PackedData::get_singleton()->has_path(p_file)) { @@ -503,7 +503,7 @@ void FileAccess::store_pascal_string(const String &p_string) { CharString cs = p_string.utf8(); store_32(cs.length()); store_buffer((uint8_t *)&cs[0], cs.length()); -}; +} String FileAccess::get_pascal_string() { uint32_t sl = get_32(); @@ -516,7 +516,7 @@ String FileAccess::get_pascal_string() { ret.parse_utf8(cs.ptr()); return ret; -}; +} void FileAccess::store_line(const String &p_line) { store_string(p_line); diff --git a/core/os/os.cpp b/core/os/os.cpp index da9dabd401..c29930e485 100644 --- a/core/os/os.cpp +++ b/core/os/os.cpp @@ -85,7 +85,8 @@ uint64_t OS::get_splash_tick_msec() const { uint64_t OS::get_unix_time() const { return 0; -}; +} + uint64_t OS::get_system_time_secs() const { return 0; } @@ -94,10 +95,9 @@ uint64_t OS::get_system_time_msecs() const { return 0; } -void OS::debug_break(){ - +void OS::debug_break() { // something -}; +} void OS::_set_logger(CompositeLogger *p_logger) { if (_logger) { @@ -127,7 +127,7 @@ void OS::print(const char *p_format, ...) { _logger->logv(p_format, argp, false); va_end(argp); -}; +} void OS::printerr(const char *p_format, ...) { va_list argp; @@ -136,7 +136,7 @@ void OS::printerr(const char *p_format, ...) { _logger->logv(p_format, argp, true); va_end(argp); -}; +} void OS::set_low_processor_usage_mode(bool p_enabled) { low_processor_usage_mode = p_enabled; @@ -160,7 +160,7 @@ String OS::get_executable_path() const { int OS::get_process_id() const { return -1; -}; +} void OS::vibrate_handheld(int p_duration_ms) { WARN_PRINT("vibrate_handheld() only works with Android and iOS"); @@ -282,12 +282,12 @@ String OS::get_cache_path() const { // Path to macOS .app bundle resources String OS::get_bundle_resource_dir() const { return "."; -}; +} // OS specific path for user:// String OS::get_user_data_dir() const { return "."; -}; +} // Absolute path to res:// String OS::get_resource_dir() const { @@ -301,7 +301,7 @@ String OS::get_system_dir(SystemDir p_dir) const { Error OS::shell_open(String p_uri) { return ERR_UNAVAILABLE; -}; +} // implement these with the canvas? @@ -346,7 +346,7 @@ String OS::get_model_name() const { void OS::set_cmdline(const char *p_execpath, const List<String> &p_args) { _execpath = p_execpath; _cmdline = p_args; -}; +} String OS::get_unique_id() const { ERR_FAIL_V(""); diff --git a/core/os/thread.cpp b/core/os/thread.cpp index 70f960ed2a..fc0ce3c9b4 100644 --- a/core/os/thread.cpp +++ b/core/os/thread.cpp @@ -63,4 +63,4 @@ Error Thread::set_name(const String &p_name) { } return ERR_UNAVAILABLE; -}; +} diff --git a/core/os/thread_dummy.cpp b/core/os/thread_dummy.cpp index 9dcddcae11..2672cd7ad9 100644 --- a/core/os/thread_dummy.cpp +++ b/core/os/thread_dummy.cpp @@ -34,16 +34,16 @@ Thread *ThreadDummy::create(ThreadCreateCallback p_callback, void *p_user, const Thread::Settings &p_settings) { return memnew(ThreadDummy); -}; +} void ThreadDummy::make_default() { Thread::create_func = &ThreadDummy::create; -}; +} RWLock *RWLockDummy::create() { return memnew(RWLockDummy); -}; +} void RWLockDummy::make_default() { RWLock::create_func = &RWLockDummy::create; -}; +} |