mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Add const lvalue ref to core/* container parameters
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user