From 97220e941715952f9c8c07fb88f718fb67788455 Mon Sep 17 00:00:00 2001 From: ChestnutYueyue <952134128@qq.com> Date: Wed, 25 Feb 2026 06:08:58 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E6=9B=B4=E6=96=B0json=E5=BA=93?= =?UTF-8?q?=E5=BC=95=E7=94=A8=E8=B7=AF=E5=BE=84=E4=B8=BAnlohmann/json?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 统一将项目中所有json/json.hpp引用改为nlohmann/json.hpp,并清理不再需要的头文件路径配置 --- Extra2D/src/effects/custom_effect_manager.cpp | 2 +- docs/API_Tutorial/04_Resource_Management.md | 2 +- examples/flappy_bird/ResLoader.cpp | 2 +- examples/flappy_bird/xmake.lua | 1 - xmake/engine.lua | 4 +--- 5 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Extra2D/src/effects/custom_effect_manager.cpp b/Extra2D/src/effects/custom_effect_manager.cpp index 5c9114e..7265e97 100644 --- a/Extra2D/src/effects/custom_effect_manager.cpp +++ b/Extra2D/src/effects/custom_effect_manager.cpp @@ -1,7 +1,7 @@ #include #include #include -#include +#include #include namespace extra2d { diff --git a/docs/API_Tutorial/04_Resource_Management.md b/docs/API_Tutorial/04_Resource_Management.md index f614dfa..8968149 100644 --- a/docs/API_Tutorial/04_Resource_Management.md +++ b/docs/API_Tutorial/04_Resource_Management.md @@ -267,7 +267,7 @@ private: ```cpp // ResLoader.cpp #include "ResLoader.h" -#include +#include namespace flappybird { diff --git a/examples/flappy_bird/ResLoader.cpp b/examples/flappy_bird/ResLoader.cpp index 7b63a18..c233ed8 100644 --- a/examples/flappy_bird/ResLoader.cpp +++ b/examples/flappy_bird/ResLoader.cpp @@ -3,7 +3,7 @@ // ============================================================================ #include "ResLoader.h" -#include +#include namespace flappybird { diff --git a/examples/flappy_bird/xmake.lua b/examples/flappy_bird/xmake.lua index 9959fce..335a134 100644 --- a/examples/flappy_bird/xmake.lua +++ b/examples/flappy_bird/xmake.lua @@ -11,7 +11,6 @@ target("flappy_bird") set_kind("binary") add_files("*.cpp") add_includedirs("../../Extra2D/include") - add_includedirs("../../Extra2D/include/json") add_deps("extra2d") -- 使用与主项目相同的平台配置 diff --git a/xmake/engine.lua b/xmake/engine.lua index 86fc4d8..9b4e1ba 100644 --- a/xmake/engine.lua +++ b/xmake/engine.lua @@ -23,9 +23,7 @@ function define_extra2d_engine() -- 第三方库头文件路径 add_includedirs("third_party/glad/include", {public = true}) - add_includedirs("third_party/nlohmann", {public = true}) - add_includedirs("third_party/simpleini", {public = true}) - add_includedirs("third_party/stb", {public = true}) + add_includedirs("third_party", {public = true}) -- 平台配置 local plat = get_current_plat()