fixed few mistake in C++17

This commit is contained in:
2022-05-31 17:21:17 +08:00
parent f2ad8ce5bf
commit fb765038f0
4 changed files with 7 additions and 6 deletions

View File

@@ -2,6 +2,7 @@
#define HGL_FILESYSTEM_FILENAME_INCLUDE #define HGL_FILESYSTEM_FILENAME_INCLUDE
#include<hgl/type/StringList.h> #include<hgl/type/StringList.h>
#include<hgl/math/PrimaryMathematics.h>
/** /**
* Maximum Path Length Limitation * Maximum Path Length Limitation
@@ -68,7 +69,7 @@ namespace hgl
{ {
int str_len[count]; int str_len[count];
for(int i=0;i<count;++) for(int i=0;i<count;i++)
str_len=strlen(str_list[i]); str_len=strlen(str_list[i]);
return ComboFilename(str_list,str_len,count,spear_char); return ComboFilename(str_list,str_len,count,spear_char);

View File

@@ -1,9 +1,9 @@
#ifndef HGL_Primary_Mathematics_INCLUDE #ifndef HGL_Primary_Mathematics_INCLUDE
#define HGL_Primary_Mathematics_INCLUDE #define HGL_Primary_Mathematics_INCLUDE
namespace hgl namespace hgl
{ {
/** /**
* <EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĺ<EFBFBD> * 求一批数的合
*/ */
template<typename T> template<typename T>
const T sum(const T *data,const int count) const T sum(const T *data,const int count)
@@ -20,7 +20,7 @@ namespace hgl
} }
/** /**
* <EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĺ<EFBFBD> * 求一批数的合
*/ */
template<typename R,typename T> template<typename R,typename T>
const R sum(const T *data,const int count) const R sum(const T *data,const int count)

View File

@@ -251,7 +251,7 @@ namespace hgl
if(!new_items) if(!new_items)
return(false); return(false);
items=new_items; this->items=new_items;
} }
return(true); return(true);

View File

@@ -15,7 +15,7 @@ namespace hgl
List<T> data_list; List<T> data_list;
bool FindPos(const T &,int &)const; ///<查找数据如果插入后,会所在的位置,返回是否存在这个数据 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: //属性 public: //属性