Skip to content

Commit

Permalink
Optimized string concatenation in _Tzdb_update_version() (#4577)
Browse files Browse the repository at this point in the history
Co-authored-by: Stephan T. Lavavej <[email protected]>
  • Loading branch information
Mq-b and StephanTLavavej authored Apr 12, 2024
1 parent 3697ebb commit 213df0c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion stl/inc/chrono
Original file line number Diff line number Diff line change
Expand Up @@ -2176,7 +2176,9 @@ namespace chrono {

_NODISCARD inline string _Tzdb_update_version(const string_view _Version, const size_t _Num_leap_seconds) {
string _Icu_version{_Version.substr(0, _Version.find_last_of('.'))};
return _STD move(_Icu_version) + "." + _STD to_string(_Num_leap_seconds);
_Icu_version += '.';
_Icu_version += _STD to_string(_Num_leap_seconds);
return _Icu_version;
}

struct _Secret_tzdb_list_construct_tag {
Expand Down

0 comments on commit 213df0c

Please sign in to comment.