From ca0595c61d53be3413bb01336ad49805ddc4277b Mon Sep 17 00:00:00 2001 From: "HuYingzhuo(hugo/hyzboy)" Date: Mon, 14 Aug 2023 20:03:38 +0800 Subject: [PATCH] updated codes. --- CMakeLists.txt | 2 +- datatype/QueueTest.cpp | 4 ++-- utils/PAttribTest.cpp | 2 +- utils/base64test.cpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f4ba89f..77850e6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -53,7 +53,7 @@ add_executable(LifetimeTest datatype/LifetimeTest.cpp) set_example_project_folder("DataType/DataArray" LifetimeTest) add_executable(CollectionTest datatype/CollectionTest.cpp) -set_example_project_folder("DataType/DataArray" CollectionTest) +cm_example_project("DataType/DataArray" CollectionTest) add_executable(DataArrayTest datatype/DataArrayTest.cpp) set_example_project_folder("DataType/DataArray" DataArrayTest) diff --git a/datatype/QueueTest.cpp b/datatype/QueueTest.cpp index 23f166d..ed38444 100644 --- a/datatype/QueueTest.cpp +++ b/datatype/QueueTest.cpp @@ -130,9 +130,9 @@ void TestObjectQueue() for(i=0;i<5;i++) //只取出5个,剩几个给自动清理处理 { - QueueTestObject *obj=tab.Pop(); + QueueTestObject *obj; - if(obj) + if(tab.Pop(obj)) delete obj; } diff --git a/utils/PAttribTest.cpp b/utils/PAttribTest.cpp index 77b8af8..444d783 100644 --- a/utils/PAttribTest.cpp +++ b/utils/PAttribTest.cpp @@ -38,7 +38,7 @@ int main(int argc,char **argv) LoadFromTextFile(ToOSString(argv[2]),pl_set); //lambda方式 - pl_set.Enum([](const String &key,PAttribBase *attr) + pl_set.Enum([](const String &key,PAttribBase * &attr) { std::cout<MakeToString().c_str()<