1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-10-31 23:26:22 +00:00

Fix use of auto that caused a copy

This commit is contained in:
Carles Fernandez 2023-11-30 08:57:30 +01:00
parent 699050baaf
commit 9c4090f71a
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D

View File

@ -498,7 +498,7 @@ rtklib_pvt_gs::rtklib_pvt_gs(uint32_t nchannels,
std::ostringstream os; std::ostringstream os;
#ifdef HAS_PUT_TIME #ifdef HAS_PUT_TIME
time_t when = std::time(nullptr); time_t when = std::time(nullptr);
auto const tm = *std::localtime(&when); const auto& tm = *std::localtime(&when);
os << std::put_time(&tm, "%z"); os << std::put_time(&tm, "%z");
#endif #endif
std::string utc_diff_str = os.str(); // in ISO 8601 format: "+HHMM" or "-HHMM" std::string utc_diff_str = os.str(); // in ISO 8601 format: "+HHMM" or "-HHMM"