From 5afe6407a1a206b86ab416ab8e04bef1e8e0108e Mon Sep 17 00:00:00 2001 From: Tulio Leao Date: Tue, 14 Jul 2020 12:42:54 -0300 Subject: [PATCH] Cleanup c-style casts from FileWatcher.cpp --- src/openrct2/core/FileWatcher.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/openrct2/core/FileWatcher.cpp b/src/openrct2/core/FileWatcher.cpp index 6be551ac51..666e0d7497 100644 --- a/src/openrct2/core/FileWatcher.cpp +++ b/src/openrct2/core/FileWatcher.cpp @@ -134,8 +134,8 @@ void FileWatcher::WatchDirectory() std::array eventData; DWORD bytesReturned; while (ReadDirectoryChangesW( - _directoryHandle, eventData.data(), (DWORD)eventData.size(), TRUE, FILE_NOTIFY_CHANGE_LAST_WRITE, &bytesReturned, - nullptr, nullptr)) + _directoryHandle, eventData.data(), static_cast(eventData.size()), TRUE, FILE_NOTIFY_CHANGE_LAST_WRITE, + &bytesReturned, nullptr, nullptr)) { auto onFileChanged = OnFileChanged; if (onFileChanged) @@ -144,7 +144,7 @@ void FileWatcher::WatchDirectory() size_t offset = 0; do { - notifyInfo = (FILE_NOTIFY_INFORMATION*)(eventData.data() + offset); + notifyInfo = reinterpret_cast(eventData.data() + offset); offset += notifyInfo->NextEntryOffset; std::wstring fileNameW(notifyInfo->FileName, notifyInfo->FileNameLength / sizeof(wchar_t));