Merge branch 'DarkflameUniverse:main' into MSVCCompilerFlags

This commit is contained in:
jadebenn 2024-01-29 22:49:29 -06:00 committed by GitHub
commit b682f13fa9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 24 additions and 12 deletions

View File

@ -13,7 +13,7 @@ jobs:
continue-on-error: true continue-on-error: true
strategy: strategy:
matrix: matrix:
os: [ windows-2022, ubuntu-22.04, macos-11 ] os: [ windows-2022, ubuntu-22.04, macos-13 ]
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
@ -25,9 +25,11 @@ jobs:
with: with:
vs-version: '[17,18)' vs-version: '[17,18)'
msbuild-architecture: x64 msbuild-architecture: x64
- name: Install libssl (Mac Only) - name: Install libssl and switch to XCode 15.2 (Mac Only)
if: ${{ matrix.os == 'macos-11' }} if: ${{ matrix.os == 'macos-13' }}
run: brew install openssl@3 run: |
brew install openssl@3
sudo xcode-select -s /Applications/Xcode_15.2.app/Contents/Developer
- name: cmake - name: cmake
uses: lukka/run-cmake@v10 uses: lukka/run-cmake@v10
with: with:

View File

@ -3,6 +3,7 @@ project(Darkflame)
include(CTest) include(CTest)
set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD 20)
set(CXX_STANDARD_REQUIRED ON)
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
# Read variables from file # Read variables from file

View File

@ -20,7 +20,7 @@
"inherits": "default" "inherits": "default"
}, },
{ {
"name": "ci-macos-11", "name": "ci-macos-13",
"displayName": "CI configure step for MacOS", "displayName": "CI configure step for MacOS",
"description": "Same as default, Used in GitHub actions workflow", "description": "Same as default, Used in GitHub actions workflow",
"inherits": "default" "inherits": "default"
@ -74,8 +74,8 @@
"jobs": 2 "jobs": 2
}, },
{ {
"name": "ci-macos-11", "name": "ci-macos-13",
"configurePreset": "ci-macos-11", "configurePreset": "ci-macos-13",
"displayName": "MacOS CI Build", "displayName": "MacOS CI Build",
"description": "This preset is used by the CI build on MacOS", "description": "This preset is used by the CI build on MacOS",
"jobs": 2 "jobs": 2
@ -95,8 +95,8 @@
} }
}, },
{ {
"name": "ci-macos-11", "name": "ci-macos-13",
"configurePreset": "ci-macos-11", "configurePreset": "ci-macos-13",
"displayName": "CI Tests on MacOS", "displayName": "CI Tests on MacOS",
"description": "Runs all tests on a Mac configuration", "description": "Runs all tests on a Mac configuration",
"execution": { "execution": {

View File

@ -68,3 +68,8 @@ else ()
endif () endif ()
target_link_libraries(dCommon ZLIB::ZLIB) target_link_libraries(dCommon ZLIB::ZLIB)
# Disable deprecation warnings on MD5.cpp and SHA512.cpp for Apple Clang
if (APPLE)
set_source_files_properties("MD5.cpp" "SHA512.cpp" PROPERTIES COMPILE_FLAGS "-Wno-deprecated-declarations")
endif()

View File

@ -451,7 +451,7 @@ void UserManager::RenameCharacter(const SystemAddress& sysAddr, Packet* packet)
"User %i tried to rename a character that it does not own!", "User %i tried to rename a character that it does not own!",
u->GetAccountID()); u->GetAccountID());
std::find_if(u->GetCharacters().begin(), u->GetCharacters().end(), [&](Character* c) { auto unusedItr = std::find_if(u->GetCharacters().begin(), u->GetCharacters().end(), [&](Character* c) {
if (c->GetID() == charID) { if (c->GetID() == charID) {
character = c; character = c;
return true; return true;

View File

@ -22,3 +22,7 @@ AddStripMessage::AddStripMessage(AMFArrayValue* arguments) : BehaviorMessageBase
} }
LOG_DEBUG("number of actions %i", actionsToAdd.size()); LOG_DEBUG("number of actions %i", actionsToAdd.size());
} }
std::vector<Action> AddStripMessage::GetActionsToAdd() const {
return actionsToAdd;
}

View File

@ -21,7 +21,7 @@ public:
AddStripMessage(AMFArrayValue* arguments); AddStripMessage(AMFArrayValue* arguments);
StripUiPosition GetPosition() const { return position; }; StripUiPosition GetPosition() const { return position; };
ActionContext GetActionContext() const { return actionContext; }; ActionContext GetActionContext() const { return actionContext; };
std::vector<Action> GetActionsToAdd() const { return actionsToAdd; }; std::vector<Action> GetActionsToAdd() const;
private: private:
StripUiPosition position; StripUiPosition position;
ActionContext actionContext; ActionContext actionContext;

View File

@ -14,6 +14,6 @@ if(UNIX)
if(NOT APPLE) if(NOT APPLE)
target_compile_options(sqlite3 PRIVATE "-Wno-return-local-addr" "-Wno-maybe-uninitialized") target_compile_options(sqlite3 PRIVATE "-Wno-return-local-addr" "-Wno-maybe-uninitialized")
else() else()
target_compile_options(sqlite3 PRIVATE "-Wno-return-stack-address" "-Wno-uninitialized") target_compile_options(sqlite3 PRIVATE "-Wno-return-stack-address" "-Wno-uninitialized" "-Wno-deprecated-declarations")
endif() endif()
endif() endif()