gulrak / filesystem

An implementation of C++17 std::filesystem for C++11 /C++14/C++17/C++20 on Windows, macOS, Linux and FreeBSD.
MIT License
1.32k stars 168 forks source link

using static_cast instead of old style cast #108

Closed philbucher closed 3 years ago

philbucher commented 3 years ago

This is a warning in GCC when using -Wold-style-cast

philbucher commented 3 years ago

I am not sure if there is a reason for using the old style cast, please check

BTW you could consider making this file a system_header like e.g. catch2 does, this way no warnings show up from it

#ifdef __clang__
#    pragma clang system_header
#elif defined __GNUC__
#    pragma GCC system_header
#endif

But then you would no longer see them during development I think Just a suggestion

gulrak commented 3 years ago

Hi, thank you for the PR, indeed I didn't want to hide warnings, as I prefer to change to code to avoid them. Those old-style casts are a result of copying code from an old tooling file of mine and I should have replaced them, so thanks for fixing it.

philbucher commented 3 years ago

cool thx!