-
Notifications
You must be signed in to change notification settings - Fork 173
Remove unnecessary TODO #335
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
base: master
Are you sure you want to change the base?
Conversation
src/time_zone_name_win.cc
Outdated
| // TODO: Switch to std::string::data() when we require C++17 or higher. | ||
| len = static_cast<std::size_t>(::WideCharToMultiByte( | ||
| CP_UTF8, WC_ERR_INVALID_CHARS, ptr, chars_len, &result[0], | ||
| CP_UTF8, WC_ERR_INVALID_CHARS, ptr, chars_len, result.data(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This lib seem to still reference older versions.
Yes, CCTZ version 2.X only requires C++11, so this has to stay as-is for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps, TODO should then be removed? Code ensures it's non empty, no need to switch to .data() imo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct ... there is no need to switch to .data(). The contributor of this code just thought it would be nice when C++17 is required. Presumably you thought the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should I remove this TODO, or simply close the PR? let me know
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy either way, so your choice.
devbww
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Thanks.
We'll have to wait for owners @derekmauro or @dinord though.
|
It looks like our CI needs some maintenance. |
Keep address-of first char for c++11 compatibility
Note, original pr was done against abseil, which is c++17 now. This lib seem to still reference older versions.