mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-10-27 18:07:55 -04:00
Compile against C++23
This enables some new goodies like std::expected. A change was needed in the mod loader code because of *something* to do with unique_ptr on an incomplete type. An overload fixed it, I've learned to stop asking questions about C++
This commit is contained in:
+1
-1
@@ -29,7 +29,7 @@ if(APPLE AND NOT CMAKE_OSX_SYSROOT)
|
||||
endif()
|
||||
|
||||
set(CMAKE_C_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD 23)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <bit>
|
||||
#include <type_traits>
|
||||
|
||||
#include "dolphin/types.h"
|
||||
#include "dolphin/mtx.h"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
cmake_minimum_required(VERSION 3.25)
|
||||
project(custom_actor_demo CXX)
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD 23)
|
||||
|
||||
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
|
||||
set(DUSK_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../.." CACHE PATH "Path to dusk source root")
|
||||
|
||||
@@ -347,7 +347,9 @@ private:
|
||||
bool m_startupComplete = false;
|
||||
|
||||
LoadedMod* try_load_mod(const std::filesystem::path& modPath, bool fromDir,
|
||||
uint32_t searchDirIndex, std::unique_ptr<ModBundle> bundle = {});
|
||||
uint32_t searchDirIndex);
|
||||
LoadedMod* try_load_mod(const std::filesystem::path& modPath, bool fromDir,
|
||||
uint32_t searchDirIndex, std::unique_ptr<ModBundle> bundle);
|
||||
void load_native(LoadedMod& mod, const std::string& dllEntry,
|
||||
const std::vector<std::string>& runtimeEntries);
|
||||
bool load_native_if_present(LoadedMod& mod);
|
||||
|
||||
@@ -132,6 +132,9 @@ static void warn_unpublished_deferred_exports(const LoadedMod& mod) {
|
||||
}
|
||||
}
|
||||
}
|
||||
LoadedMod* ModLoader::try_load_mod(const fs::path& modPath, bool fromDir, uint32_t searchDirIndex) {
|
||||
return try_load_mod(modPath, fromDir, searchDirIndex, {});
|
||||
}
|
||||
|
||||
LoadedMod* ModLoader::try_load_mod(const fs::path& modPath, bool fromDir, uint32_t searchDirIndex,
|
||||
std::unique_ptr<ModBundle> bundle) {
|
||||
|
||||
Reference in New Issue
Block a user