From 3c36e833798a87a5eb83eaeb281f5ba7ae01611b Mon Sep 17 00:00:00 2001 From: zhangjidong <873721519@qq.com> Date: Sat, 29 Jun 2024 16:54:42 +0800 Subject: [PATCH] =?UTF-8?q?sdk=20idl=E5=B7=A5=E5=85=B7=E8=AF=BB=E5=8F=96?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=A4=B1=E8=B4=A5=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhangjidong <873721519@qq.com> --- main.cpp | 2 +- util/file.cpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index 138915c..f3bc0a8 100644 --- a/main.cpp +++ b/main.cpp @@ -93,7 +93,7 @@ static int DoCompile(Options& options, std::shared_ptr& metadata) return 0; } -static int DoGenerage(Options& options, std::shared_ptr& metadata) +static int DoGenerage(const Options& options, std::shared_ptr& metadata) { if (options.DoGenerateCode()) { if (metadata == nullptr) { diff --git a/util/file.cpp b/util/file.cpp index b912397..ed6f963 100644 --- a/util/file.cpp +++ b/util/file.cpp @@ -41,11 +41,15 @@ File::File(const String& path, int mode) if (absolutePath != nullptr) { pathTmp = absolutePath; free(absolutePath); + } else { + pathTmp = path; } #else char absolutePath[_MAX_PATH]; if (_fullpath(absolutePath, path.string(), _MAX_PATH) == nullptr) { pathTmp = absolutePath; + } else { + pathTmp = path; } #endif