From b5ef4424d47569447d374f0e86f50e8e04444148 Mon Sep 17 00:00:00 2001 From: hyzboy Date: Thu, 20 Feb 2025 02:37:54 +0800 Subject: [PATCH] fixed a but in ReplaceExtName that replace extname at . --- inc/hgl/filesystem/Filename.h | 2 +- inc/hgl/math/FastTriangle.h | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/inc/hgl/filesystem/Filename.h b/inc/hgl/filesystem/Filename.h index f385a49..f0fe291 100644 --- a/inc/hgl/filesystem/Filename.h +++ b/inc/hgl/filesystem/Filename.h @@ -350,7 +350,7 @@ namespace hgl const int pos=old_name.FindRightChar(split_char); if(pos!=-1) - return old_name.SubString(0,pos)+new_extname; + return old_name.SubString(0,pos+1)+new_extname; else return old_name+String::charOf(split_char)+new_extname; } diff --git a/inc/hgl/math/FastTriangle.h b/inc/hgl/math/FastTriangle.h index 3ddd668..3977248 100644 --- a/inc/hgl/math/FastTriangle.h +++ b/inc/hgl/math/FastTriangle.h @@ -1,5 +1,4 @@ -#ifndef HGL_ALGORITHM_MATH_FAST_TRIANGLE_FUNCTION_INCLUDE -#define HGL_ALGORITHM_MATH_FAST_TRIANGLE_FUNCTION_INCLUDE +#pragma once #include #include @@ -73,4 +72,3 @@ namespace hgl return x*(1.12*x - 0.12); } }//namespace hgl -#endif//HGL_ALGORITHM_MATH_FAST_TRIANGLE_FUNCTION_INCLUDE