Skip to content

Commit

Permalink
using static_cast instead of old style cast
Browse files Browse the repository at this point in the history
This is a warning in GCC when using -Wold-style-cast
  • Loading branch information
philbucher authored Mar 18, 2021
1 parent 399941f commit 67e708c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/ghc/filesystem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1797,7 +1797,7 @@ GHC_INLINE bool equals_simple_insensitive(const path::value_type* str1, const pa

GHC_INLINE int compare_simple_insensitive(const path::value_type* str1, size_t len1, const path::value_type* str2, size_t len2)
{
while (len1 > 0 && len2 > 0 && ::tolower((unsigned char)*str1) == ::tolower((unsigned char)*str2)) {
while (len1 > 0 && len2 > 0 && ::tolower(static_cast<unsigned char>(*str1)) == ::tolower(static_cast<unsigned char>(*str2))) {
--len1;
--len2;
++str1;
Expand Down

0 comments on commit 67e708c

Please sign in to comment.