From b2feae4bc18df059fcf04cffaff80ba2479dd91a Mon Sep 17 00:00:00 2001 From: Alex Zhang Date: Tue, 26 Jul 2022 21:39:30 +0800 Subject: [PATCH] fix: fixed linux build errors --- 3rdparty/include/meojson/json.hpp | 4 ++-- CMakeLists.txt | 2 +- src/MeoAssistant/AsstTypes.h | 2 +- src/MeoAssistant/ItemConfiger.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/3rdparty/include/meojson/json.hpp b/3rdparty/include/meojson/json.hpp index ce58b908d4..e6562ce496 100644 --- a/3rdparty/include/meojson/json.hpp +++ b/3rdparty/include/meojson/json.hpp @@ -102,12 +102,12 @@ namespace json template std::optional find(size_t pos) const { - return is_array() ? as_array().find(pos) : std::nullopt; + return is_array() ? as_array().template find(pos) : std::nullopt; } template std::optional find(const std::string& key) const { - return is_object() ? as_object().find(key) : std::nullopt; + return is_object() ? as_object().template find(key) : std::nullopt; } bool as_boolean() const; diff --git a/CMakeLists.txt b/CMakeLists.txt index b723f42825..9e37451fd6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,7 +17,7 @@ if (WIN32) endif () add_compile_options("$<$:/W4;/WX>") -add_compile_options("$<$>:-Wall;-Wextra;-Wpedantic;-Werror>") +add_compile_options("$<$>:-Wall;-Wextra;-Wpedantic>") add_definitions(-DASST_DLL_EXPORTS) diff --git a/src/MeoAssistant/AsstTypes.h b/src/MeoAssistant/AsstTypes.h index 585da43581..60c34ab72c 100644 --- a/src/MeoAssistant/AsstTypes.h +++ b/src/MeoAssistant/AsstTypes.h @@ -7,7 +7,7 @@ #include #include #include - +#include #define NOMINMAX namespace json diff --git a/src/MeoAssistant/ItemConfiger.h b/src/MeoAssistant/ItemConfiger.h index 6feadd4f43..49f4101e3a 100644 --- a/src/MeoAssistant/ItemConfiger.h +++ b/src/MeoAssistant/ItemConfiger.h @@ -4,7 +4,7 @@ #include #include - +#include namespace asst { class ItemConfiger : public AbstractConfiger