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
1 changed files with 1 additions and 1 deletions

View File

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