From 9eb928dc3a567f9cc95548bdd3955733944a63ea Mon Sep 17 00:00:00 2001 From: hyzboy Date: Sun, 24 Dec 2023 01:34:45 +0800 Subject: [PATCH] layouted codes.added ShaderString. --- inc/hgl/log/LogInfo.h | 2 +- inc/hgl/type/String.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/inc/hgl/log/LogInfo.h b/inc/hgl/log/LogInfo.h index 8cad20a..b80480d 100644 --- a/inc/hgl/log/LogInfo.h +++ b/inc/hgl/log/LogInfo.h @@ -62,7 +62,7 @@ namespace hgl #define LOG_ERROR(str) {Log(LogLevel::Error, str);} #define RETURN_FALSE {DebugLog(LogLevel::Log,OS_TEXT("return(false)"), __FILE__,__LINE__,__HGL_FUNC__);return(false);} - #define RETURN_ERROR(v) {DebugLog(LogLevel::Log,OS_TEXT("return error(")+OSString::numberOf(v)+OS_TEXT(")"), __FILE__,__LINE__,__HGL_FUNC__);return(v);} + #define RETURN_ERROR(v) {DebugLog(LogLevel::Log,OS_TEXT("return error(")+OSString::numberOf(v)+OS_TEXT(")"),__FILE__,__LINE__,__HGL_FUNC__);return(v);} #define RETURN_ERROR_NULL {DebugLog(LogLevel::Log,OS_TEXT("return error(nullptr)"), __FILE__,__LINE__,__HGL_FUNC__);return(nullptr);} #define RETURN_BOOL(proc) {if(proc)return(true);RETURN_FALSE} diff --git a/inc/hgl/type/String.h b/inc/hgl/type/String.h index 185ccb5..9741d0d 100644 --- a/inc/hgl/type/String.h +++ b/inc/hgl/type/String.h @@ -1344,6 +1344,8 @@ namespace hgl using OSString =String; using WideString =String; + using ShaderString =UTF8String; + template bool ToNumber(const String &str,int &value){return str.ToInt(value);} template bool ToNumber(const String &str,uint &value){return str.ToUint(value);} template bool ToNumber(const String &str,float &value){return str.ToFloat(value);}