chore(build): resolve MSVC warnings

This commit is contained in:
Adam Heinermann 2025-09-23 15:19:21 -07:00 committed by fallenoak
parent df14314ea1
commit 92b0c4778f
6 changed files with 19 additions and 10 deletions

View file

@ -43,6 +43,8 @@ add_library(storm STATIC
${STORM_SOURCES}
)
target_compile_definitions(storm PRIVATE _CRT_SECURE_NO_WARNINGS)
target_include_directories(storm
PUBLIC
${PROJECT_SOURCE_DIR}

View file

@ -43,12 +43,12 @@ THandle TSExportTableSimpleReuse<T, THandle>::GenerateUniqueHandle() {
this->m_wrapped = 1;
}
if (!this->m_wrapped || !this->Ptr(reinterpret_cast<THandle>(this->m_sequence))) {
if (!this->m_wrapped || !this->Ptr(reinterpret_cast<THandle>(static_cast<uintptr_t>(this->m_sequence)))) {
break;
}
}
return reinterpret_cast<THandle>(this->m_sequence);
return reinterpret_cast<THandle>(static_cast<uintptr_t>(this->m_sequence));
}
template <class T, class THandle>

View file

@ -69,7 +69,7 @@ T* TSExportTableSyncReuse<T, THandle, TLockedHandle, TSync>::NewLock(THandle* ha
template <class T, class THandle, class TLockedHandle, class TSync>
void TSExportTableSyncReuse<T, THandle, TLockedHandle, TSync>::SyncEnterLock(TLockedHandle* lockedHandlePtr, int32_t forWriting) {
this->m_sync.Enter(forWriting);
*lockedHandlePtr = reinterpret_cast<TLockedHandle>(forWriting ? 1 : -1);
*lockedHandlePtr = reinterpret_cast<TLockedHandle>(static_cast<intptr_t>(forWriting ? 1 : -1));
}
template <class T, class THandle, class TLockedHandle, class TSync>