Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pattern_formatter-inl: fix reorder-ctor warning #2278

Merged
merged 1 commit into from
Feb 15, 2022
Merged

Conversation

adriweb
Copy link
Contributor

@adriweb adriweb commented Feb 15, 2022

Fix Wreorder-ctor warning, as it broke my -Wall -Wextra -Werror build.

spdlog/pattern_formatter-inl.h:1028:7: error: field 'custom_handlers_' will be initialized after field 'need_localtime_' [-Werror,-Wreorder-ctor]
    , custom_handlers_(std::move(custom_user_flags))
      ^

Move the initialization of need_localtime_(true) right after pattern_time_type_ as expected.

Fix `Wreorder-ctor` warning

```
spdlog/pattern_formatter-inl.h:1028:7: error: field 'custom_handlers_' will be initialized after field 'need_localtime_' [-Werror,-Wreorder-ctor]
    , custom_handlers_(std::move(custom_user_flags))
      ^
```

Move the initialization of `need_localtime_(true)` right after `pattern_time_type_` as expected.
@gabime gabime merged commit 2f2d04b into gabime:v1.x Feb 15, 2022
@gabime
Copy link
Owner

gabime commented Feb 15, 2022

Thanks @adriweb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants