]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
chore: Improve cast and avoid repeating types (#1459)
authorSilver Zachara <silver.zachara@gmail.com>
Mon, 27 May 2024 19:48:05 +0000 (21:48 +0200)
committerGitHub <noreply@github.com>
Mon, 27 May 2024 19:48:05 +0000 (21:48 +0200)
src/ccache/InodeCache.cpp
src/ccache/util/wincompat.hpp

index d4ce38381245f5ecf88b66b6cb467f3d3ef51ca9..cb3952acbec3f019b253295257d6db3f316c2af5 100644 (file)
@@ -155,7 +155,7 @@ fd_is_on_known_to_work_file_system(int fd)
   }
   return known_to_work;
 #else
-  HANDLE file = (HANDLE)_get_osfhandle(fd);
+  HANDLE file = reinterpret_cast<HANDLE>(_get_osfhandle(fd));
   if (file == INVALID_HANDLE_VALUE) {
     return false;
   }
index f2f2a7984f4e0cbea1f302e98dfc55257fe7857a..f8d840607fee70ebd06328ee6a9b6d1f457822fc 100644 (file)
@@ -29,8 +29,8 @@
 // From:
 // http://mesos.apache.org/api/latest/c++/3rdparty_2stout_2include_2stout_2windows_8hpp_source.html
 #  ifdef _MSC_VER
-const mode_t S_IRUSR = mode_t{_S_IREAD};
-const mode_t S_IWUSR = mode_t{_S_IWRITE};
+constexpr auto S_IRUSR = mode_t{_S_IREAD};
+constexpr auto S_IWUSR = mode_t{_S_IWRITE};
 #  endif
 
 #  ifndef S_IFIFO