diff --git a/inc/hgl/Macro.h b/inc/hgl/Macro.h index 03cbf7b..fd6980b 100644 --- a/inc/hgl/Macro.h +++ b/inc/hgl/Macro.h @@ -66,7 +66,7 @@ namespace hgl { \ FREE_OBJECT_ARRAY(name,num); \ \ - name=null; \ + name=nullptr; \ }\ } diff --git a/inc/hgl/filesystem/FileSystem.h b/inc/hgl/filesystem/FileSystem.h index 29d467c..d46c425 100644 --- a/inc/hgl/filesystem/FileSystem.h +++ b/inc/hgl/filesystem/FileSystem.h @@ -1,7 +1,7 @@ -#ifndef HGL_FILE_SYSTEM_INCLUDE -#define HGL_FILE_SYSTEM_INCLUDE +#pragma once #include + namespace hgl { namespace io @@ -48,7 +48,7 @@ namespace hgl bool GetCurrentProgramPath(OSString &); ///<取得当前程序所在路径 bool GetLocalAppdataPath(OSString &); ///<取得当前用户应用程序数据存放路径 - bool GetOSLibararyPath(OSString &); ///<取得操作系统共用动态库路径 + bool GetOSLibraryPath(OSString &); ///<取得操作系统共用动态库路径 /** * @param filename 要查找的文件名称 @@ -95,7 +95,7 @@ namespace hgl bool is_file:1; ///<是文件 bool is_directory:1; ///<是目录 - bool is_hiddle:1; ///<是否隐藏文件 + bool is_hidden:1; ///<是否隐藏文件 #if HGL_OS != HGL_OS_Windows bool is_link:1; ///<是否是链接 @@ -114,4 +114,3 @@ namespace hgl int GetFileInfoList(ArrayList &, const OSString &folder_name, bool proc_folder, bool proc_file, bool sub_folder); }//namespace filesystem }//namespace hgl -#endif//HGL_FILE_SYSTEM_INCLUDE diff --git a/src/Other/ExpendString.cpp b/src/Other/ExpendString.cpp index 879df02..d7d5d1c 100644 --- a/src/Other/ExpendString.cpp +++ b/src/Other/ExpendString.cpp @@ -4,27 +4,27 @@ namespace hgl { - Map ExpendString; + Map ExpandString; - void SetExpendString(const OSString &flag,const OSString &str) + void SetExpandString(const OSString &flag,const OSString &str) { OSString flag_string=flag; flag_string.LowerCase(); - ExpendString.Add(flag_string,str); + ExpandString.Add(flag_string,str); } - void ClearExpendString(const OSString &flag) + void ClearExpandString(const OSString &flag) { OSString flag_string=flag; flag_string.LowerCase(); - ExpendString.DeleteByKey(flag_string); + ExpandString.DeleteByKey(flag_string); } - bool GetExpendString(const OSString &flag,OSString &str) + bool GetExpandString(const OSString &flag,OSString &str) { struct { @@ -72,7 +72,7 @@ namespace hgl flag_string.LowerCase(); - return ExpendString.Get(flag_string,str); + return ExpandString.Get(flag_string,str); } /** @@ -80,7 +80,7 @@ namespace hgl * @param source 原始字符串 * @param target 转换后的字符串 */ - bool ConvertExpendString(const OSString &source,OSString &target) + bool ConvertExpandString(const OSString &source,OSString &target) { target=source; @@ -101,7 +101,7 @@ namespace hgl OSString flag(start+2,end-start-2); OSString flag_string; - if(!GetExpendString(flag,flag_string)) + if(!GetExpandString(flag,flag_string)) { LOG_ERROR(OS_TEXT("无法识别的标识串:")+flag);