Skip to content

Commit 24fe5cf

Browse files
committed
[date_time_scanner] reduce size of last_tm
1 parent 4d01833 commit 24fe5cf

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/base/date_time_scanner.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ date_time_scanner::scan(const char* time_dest,
197197
}
198198
this->to_localtime(gmt, *tm_out);
199199
}
200-
const auto& last_tm = this->dts_last_tm.et_tm;
200+
const auto& last_tm = this->dts_last_tm;
201201
if (last_tm.tm_year == tm_out->et_tm.tm_year
202202
&& last_tm.tm_mon == tm_out->et_tm.tm_mon
203203
&& last_tm.tm_mday == tm_out->et_tm.tm_mday
@@ -261,7 +261,7 @@ date_time_scanner::scan(const char* time_dest,
261261
}
262262
this->to_localtime(gmt, *tm_out);
263263
}
264-
const auto& last_tm = this->dts_last_tm.et_tm;
264+
const auto& last_tm = this->dts_last_tm;
265265
if (last_tm.tm_year == tm_out->et_tm.tm_year
266266
&& last_tm.tm_mon == tm_out->et_tm.tm_mon
267267
&& last_tm.tm_mday == tm_out->et_tm.tm_mday
@@ -293,7 +293,7 @@ date_time_scanner::scan(const char* time_dest,
293293
}
294294

295295
if (retval != nullptr) {
296-
this->dts_last_tm = *tm_out;
296+
this->dts_last_tm = tm_out->et_tm;
297297
this->dts_last_tv = tv_out;
298298
}
299299

@@ -337,7 +337,7 @@ date_time_scanner::clear()
337337
this->dts_fmt_lock = -1;
338338
this->dts_fmt_len = -1;
339339
this->dts_last_tv = timeval{};
340-
this->dts_last_tm = exttm{};
340+
this->dts_last_tm = tm{};
341341
this->dts_localtime_cached_gmt = 0;
342342
this->dts_localtime_cached_tm = tm{};
343343
}
@@ -347,7 +347,7 @@ date_time_scanner::set_base_time(time_t base_time, const tm& local_tm)
347347
{
348348
this->dts_base_time = base_time;
349349
this->dts_base_tm.et_tm = local_tm;
350-
this->dts_last_tm = exttm{};
350+
this->dts_last_tm = tm{};
351351
this->dts_last_tv = timeval{};
352352
}
353353

src/base/date_time_scanner.hh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ struct date_time_scanner {
9393
struct exttm dts_base_tm;
9494
int dts_fmt_lock{-1};
9595
int dts_fmt_len{-1};
96-
struct exttm dts_last_tm {};
96+
tm dts_last_tm {};
9797
struct timeval dts_last_tv {};
9898
time_t dts_local_offset_cache{0};
9999
time_t dts_local_offset_valid{0};

0 commit comments

Comments
 (0)