diff --git a/LICENSE b/LICENSE index d76398fe..5edbc07e 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2023 Chunel Feng +Copyright (c) 2024 Chunel Feng Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index d4fc7200..f81f551c 100644 --- a/README.md +++ b/README.md @@ -303,7 +303,7 @@ int main() { * 提供`proto`定义文件 * 添加`mutable`(异变)功能,提供依赖关系注册语法糖 -[2023.12.23 - v2.5.4 - Chunel] +[2024.01.05 - v2.5.4 - Chunel] * 提供`test`内容,包含性能和功能方面的测试用例 * 优化`event`(事件)机制,支持异步等待功能 diff --git a/src/CBasic/CStrDefine.h b/src/CBasic/CStrDefine.h index a06abedf..b0ca4c6a 100644 --- a/src/CBasic/CStrDefine.h +++ b/src/CBasic/CStrDefine.h @@ -15,12 +15,11 @@ CGRAPH_NAMESPACE_BEGIN -static const std::string& CGRAPH_EMPTY = ""; -static const std::string& CGRAPH_DEFAULT = "default"; -static const std::string& CGRAPH_UNKNOWN = "unknown"; -static const std::string& CGRAPH_BASIC_EXCEPTION = "CGraph default exception"; -static const std::string& CGRAPH_FUNCTION_NO_SUPPORT = "CGraph function no support"; -static const std::string& CGRAPH_INPUT_IS_NULL = "input is nullptr"; +static const char* CGRAPH_EMPTY = ""; +static const char* CGRAPH_DEFAULT = "default"; +static const char* CGRAPH_UNKNOWN = "unknown"; +static const char* CGRAPH_FUNCTION_NO_SUPPORT = "function no support"; +static const char* CGRAPH_INPUT_IS_NULL = "input is nullptr"; CGRAPH_NAMESPACE_END diff --git a/src/UtilsCtrl/UtilsDefine.h b/src/UtilsCtrl/UtilsDefine.h index c375d28c..cae4a870 100644 --- a/src/UtilsCtrl/UtilsDefine.h +++ b/src/UtilsCtrl/UtilsDefine.h @@ -69,7 +69,7 @@ CStatus __ASSERT_NOT_NULL(T t, Args... args) { template CVoid __ASSERT_NOT_NULL_THROW_EXCEPTION(T t) { if (unlikely(nullptr == t)) { - CGRAPH_THROW_EXCEPTION("[CException] " + CGRAPH_INPUT_IS_NULL) + CGRAPH_THROW_EXCEPTION("[CException] " + std::string(CGRAPH_INPUT_IS_NULL)) } } diff --git a/xmake.lua b/xmake.lua index 6b07eb90..8a251016 100644 --- a/xmake.lua +++ b/xmake.lua @@ -37,7 +37,12 @@ tutorial_list = { "T18-Event", "T19-Cancel", "T20-YieldResume", - "T21-MultiCondition" + "T21-MultiCondition", + "T22-Timeout", + "T23-Some", + "T24-Fence", + "T25-Coordinator", + "T26-Mutable" } -- add tutorial target one by one @@ -47,4 +52,4 @@ for _, v in pairs(tutorial_list) do add_includedirs("src") add_headerfiles("src/CGraph.h") add_files("src/**.cpp", string.format("tutorial/%s.cpp", v)) -end \ No newline at end of file +end