Skip to content

Commit

Permalink
Fix warning C26495
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmy-park committed Apr 15, 2024
1 parent 97a90d8 commit 64fea7b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions include/fmt/chrono.h
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ inline auto localtime(std::time_t time) -> std::tm {
std::time_t time_;
std::tm tm_;

dispatcher(std::time_t t) : time_(t) {}
dispatcher(std::time_t t) : time_(t), tm_() {}

auto run() -> bool {
using namespace fmt::detail;
Expand Down Expand Up @@ -576,7 +576,7 @@ inline auto gmtime(std::time_t time) -> std::tm {
std::time_t time_;
std::tm tm_;

dispatcher(std::time_t t) : time_(t) {}
dispatcher(std::time_t t) : time_(t), tm_() {}

auto run() -> bool {
using namespace fmt::detail;
Expand Down Expand Up @@ -1785,7 +1785,8 @@ class get_locale {
bool has_locale_ = false;

public:
get_locale(bool localized, locale_ref loc) : has_locale_(localized) {
get_locale(bool localized, locale_ref loc)
: locale_(), has_locale_(localized) {
if (localized)
::new (&locale_) std::locale(loc.template get<std::locale>());
}
Expand Down

0 comments on commit 64fea7b

Please sign in to comment.