From fb765038f02ce84e1a2a44a2423c5e4a1de7b68e Mon Sep 17 00:00:00 2001 From: "HuYingzhuo(hugo/hyzboy)" Date: Tue, 31 May 2022 17:21:17 +0800 Subject: [PATCH] fixed few mistake in C++17 --- inc/hgl/filesystem/Filename.h | 3 ++- inc/hgl/math/PrimaryMathematics.h | 6 +++--- inc/hgl/type/ObjectList.cpp | 2 +- inc/hgl/type/SortedSets.h | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/inc/hgl/filesystem/Filename.h b/inc/hgl/filesystem/Filename.h index 4d065ad..1a41f14 100644 --- a/inc/hgl/filesystem/Filename.h +++ b/inc/hgl/filesystem/Filename.h @@ -2,6 +2,7 @@ #define HGL_FILESYSTEM_FILENAME_INCLUDE #include +#include /** * Maximum Path Length Limitation @@ -68,7 +69,7 @@ namespace hgl { int str_len[count]; - for(int i=0;i const T sum(const T *data,const int count) @@ -20,7 +20,7 @@ namespace hgl } /** - * һĺ + * 求一批数的合 */ template const R sum(const T *data,const int count) diff --git a/inc/hgl/type/ObjectList.cpp b/inc/hgl/type/ObjectList.cpp index 0bd155f..d8b9f6b 100644 --- a/inc/hgl/type/ObjectList.cpp +++ b/inc/hgl/type/ObjectList.cpp @@ -251,7 +251,7 @@ namespace hgl if(!new_items) return(false); - items=new_items; + this->items=new_items; } return(true); diff --git a/inc/hgl/type/SortedSets.h b/inc/hgl/type/SortedSets.h index 7015167..e8561c0 100644 --- a/inc/hgl/type/SortedSets.h +++ b/inc/hgl/type/SortedSets.h @@ -15,7 +15,7 @@ namespace hgl List data_list; bool FindPos(const T &,int &)const; ///<查找数据如果插入后,会所在的位置,返回是否存在这个数据 - int FindPos(const T &flag)const{int pos;return FindPos(flag,pos)?return(pos):-1;} ///<查找数据如果插入后,会所在的位置 + int FindPos(const T &flag)const{int pos;return FindPos(flag,pos)?pos:-1;} ///<查找数据如果插入后,会所在的位置 public: //属性