Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix MSVC 19.40 build crashing, fix clangd warnings #386

Merged
merged 6 commits into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/continous_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ jobs:
steps:
- uses: llvm/actions/install-ninja@main

- name: Install llvm 17
if: matrix.toolset_name == 'Ninja'
run: choco install llvm --version 17.0.6 --allow-downgrade -y

- uses: actions/checkout@v2
with:
fetch-depth: 1
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/whip-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ jobs:
steps:
- uses: llvm/actions/install-ninja@main

- name: Install llvm 17
run: choco install llvm --version 17.0.6 --allow-downgrade -y

- uses: actions/checkout@v2
with:
fetch-depth: 1
Expand Down
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ add_compile_definitions(_ITERATOR_DEBUG_LEVEL=0)
add_compile_definitions(NOMINMAX)
add_compile_definitions(WIN32_LEAN_AND_MEAN)

# Fix MSVC 19.40 crash with mutex due to spelunky using an old redist (mscvp140.dll)
# Related links: https://github.com/microsoft/STL/releases/tag/vs-2022-17.10 | https://github.com/actions/runner-images/issues/10004
add_compile_definitions(_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR)

if(BUILD_OVERLUNKY)
add_compile_definitions(SPEL2_EDITABLE_SCRIPTS)
add_compile_definitions(SPEL2_EXTRA_ANNOYING_SCRIPT_ERRORS)
Expand Down
2 changes: 1 addition & 1 deletion src/fmt
Submodule fmt updated 226 files
2 changes: 1 addition & 1 deletion src/game_api/script/lua_backend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ LuaBackend::~LuaBackend()

{
std::lock_guard lock{g_all_backends_mutex};
std::erase_if(g_all_backends, [=](const std::unique_ptr<ProtectedBackend>& protected_backend)
std::erase_if(g_all_backends, [this](const std::unique_ptr<ProtectedBackend>& protected_backend)
{ return protected_backend.get() == self; });
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/game_api/sound_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,9 @@ PlayingSound CustomSound::play(bool paused, SOUND_TYPE sound_type)
{
return std::visit(
overloaded{
[=](FMOD::Sound* sound)
[=, this](FMOD::Sound* sound)
{ return m_SoundManager->play_sound(sound, paused, sound_type == SOUND_TYPE::Music); },
[=](FMODStudio::EventDescription* event)
[=, this](FMODStudio::EventDescription* event)
{ return m_SoundManager->play_event(event, paused, sound_type == SOUND_TYPE::Music); },
[](std::monostate)
{
Expand Down
2 changes: 1 addition & 1 deletion src/json
Submodule json updated 1433 files
2 changes: 1 addition & 1 deletion src/shared/logger.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ struct fmt::formatter<ByteStr>
}

template <typename FormatContext>
auto format(ByteStr byte_str, FormatContext& ctx)
auto format(const ByteStr& byte_str, FormatContext& ctx) const
{
auto out = ctx.out();

Expand Down
Loading