From 330bfa2d4d3ad39eafd5ee9a65e6e9b2ca197387 Mon Sep 17 00:00:00 2001 From: MistEO Date: Fri, 6 Aug 2021 11:54:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0meojson=E5=BA=93=EF=BC=8C?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=B8=80=E4=BA=9B=E9=A1=B9=E7=9B=AE=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 3rdPart/include/meojson/json_value.h | 13 ++++++++++++- MeoAssistance/MeoAssistance.vcxproj | 7 +++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/3rdPart/include/meojson/json_value.h b/3rdPart/include/meojson/json_value.h index 511cca501b..147c86c4f1 100644 --- a/3rdPart/include/meojson/json_value.h +++ b/3rdPart/include/meojson/json_value.h @@ -125,7 +125,18 @@ namespace json value &operator[](size_t pos); value &operator[](const std::string &key); value &operator[](std::string &&key); - explicit operator bool() const noexcept { return valid(); } + //explicit operator bool() const noexcept { return valid(); } + + explicit operator bool() const { return as_boolean(); } + explicit operator int() const { return as_integer(); } + explicit operator long() const { return as_long(); } + explicit operator unsigned long() const { return as_unsigned_long(); } + explicit operator long long() const { return as_long_long(); } + explicit operator unsigned long long() const { return as_unsigned_long_long(); } + explicit operator float() const { return as_float(); } + explicit operator double() const { return as_double(); } + explicit operator long double() const { return as_long_double(); } + explicit operator std::string() const { return as_string(); } private: template diff --git a/MeoAssistance/MeoAssistance.vcxproj b/MeoAssistance/MeoAssistance.vcxproj index 80edc5b671..ee204706a3 100644 --- a/MeoAssistance/MeoAssistance.vcxproj +++ b/MeoAssistance/MeoAssistance.vcxproj @@ -160,7 +160,7 @@ stdcpp17 stdc11 MultiThreaded - Disabled + MaxSpeed Console @@ -192,7 +192,8 @@ xcopy /e /y /i $(SolutionDir)3rdPart\resource $(TargetDir)resource Level3 - true + + false true NDEBUG;_CONSOLE;CSHARP_API;MEO_DLL_EXPORTS;LOG_TRACE;%(PreprocessorDefinitions) @@ -201,6 +202,8 @@ xcopy /e /y /i $(SolutionDir)3rdPart\resource $(TargetDir)resource stdc11 MultiThreaded Disabled + false + EnableFastChecks Console