summaryrefslogtreecommitdiffstats
path: root/core/os/time.cpp
diff options
context:
space:
mode:
authorMuller-Castro <37383316+Muller-Castro@users.noreply.github.com>2024-01-08 22:36:19 -0300
committerMuller-Castro <37383316+Muller-Castro@users.noreply.github.com>2024-02-14 11:20:36 -0300
commita8bc9f3e78788bdf0be7348fcbfac15c127f1f48 (patch)
treecb6029160994d6445123f01ffe142e3e3ff6f96a /core/os/time.cpp
parent907db8eebcecb97d527edcaff77a1c87a6c068f5 (diff)
downloadredot-engine-a8bc9f3e78788bdf0be7348fcbfac15c127f1f48.tar.gz
Add const lvalue ref to core/* container parameters
Diffstat (limited to 'core/os/time.cpp')
-rw-r--r--core/os/time.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/os/time.cpp b/core/os/time.cpp
index 7068935d36..d1d3588d09 100644
--- a/core/os/time.cpp
+++ b/core/os/time.cpp
@@ -255,7 +255,7 @@ String Time::get_time_string_from_unix_time(int64_t p_unix_time_val) const {
return vformat("%02d:%02d:%02d", hour, minute, second);
}
-Dictionary Time::get_datetime_dict_from_datetime_string(String p_datetime, bool p_weekday) const {
+Dictionary Time::get_datetime_dict_from_datetime_string(const String &p_datetime, bool p_weekday) const {
PARSE_ISO8601_STRING(Dictionary())
Dictionary dict;
dict[YEAR_KEY] = year;
@@ -273,7 +273,7 @@ Dictionary Time::get_datetime_dict_from_datetime_string(String p_datetime, bool
return dict;
}
-String Time::get_datetime_string_from_datetime_dict(const Dictionary p_datetime, bool p_use_space) const {
+String Time::get_datetime_string_from_datetime_dict(const Dictionary &p_datetime, bool p_use_space) const {
ERR_FAIL_COND_V_MSG(p_datetime.is_empty(), "", "Invalid datetime Dictionary: Dictionary is empty.");
EXTRACT_FROM_DICTIONARY
VALIDATE_YMDHMS("")
@@ -287,7 +287,7 @@ String Time::get_datetime_string_from_datetime_dict(const Dictionary p_datetime,
return timestamp;
}
-int64_t Time::get_unix_time_from_datetime_dict(const Dictionary p_datetime) const {
+int64_t Time::get_unix_time_from_datetime_dict(const Dictionary &p_datetime) const {
ERR_FAIL_COND_V_MSG(p_datetime.is_empty(), 0, "Invalid datetime Dictionary: Dictionary is empty");
EXTRACT_FROM_DICTIONARY
VALIDATE_YMDHMS(0)
@@ -295,7 +295,7 @@ int64_t Time::get_unix_time_from_datetime_dict(const Dictionary p_datetime) cons
return day_number * SECONDS_PER_DAY + hour * 3600 + minute * 60 + second;
}
-int64_t Time::get_unix_time_from_datetime_string(String p_datetime) const {
+int64_t Time::get_unix_time_from_datetime_string(const String &p_datetime) const {
PARSE_ISO8601_STRING(-1)
VALIDATE_YMDHMS(0)
YMD_TO_DAY_NUMBER