utils: Improve the return value of timestampToDate().

When constructing the empty string, it is better to use `std::string()` (or
just `{}` when returning a value) instead of `""` as the latter calls a
construct that needs to traverse the empty string literal, which is needless
pessimization.
This commit is contained in:
Petr Zemek 2019-08-15 08:47:42 +02:00 committed by Petr Zemek
parent 2305ce083d
commit 2efdb12a58

View File

@ -87,7 +87,7 @@ std::string getCurrentYear() {
*/
std::string timestampToDate(std::tm *tm) {
if (tm == nullptr) {
return "";
return {};
}
std::stringstream ss;