From 948b68774cebf2b9a2994b7b9b8102f9637a98f3 Mon Sep 17 00:00:00 2001
From: Shi Xian <40013335+R1ckShi@users.noreply.github.com>
Date: 星期二, 16 一月 2024 11:03:55 +0800
Subject: [PATCH] Merge pull request #1249 from alibaba-damo-academy/main

---
 runtime/onnxruntime/src/encode_converter.h |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/runtime/onnxruntime/src/encode_converter.h b/runtime/onnxruntime/src/encode_converter.h
index f8d3b23..a135eb6 100644
--- a/runtime/onnxruntime/src/encode_converter.h
+++ b/runtime/onnxruntime/src/encode_converter.h
@@ -88,15 +88,15 @@
 #ifdef _MSC_VER
         // convert to the local ansi page
         static std::string UTF8ToLocaleAnsi(const std::string& strUTF8) {
-            int len = MultiByteToWideChar(CP_UTF8, 0, strUTF8.c_str(), -1, NULL, 0);
+            int len = MultiByteToWideChar(CP_UTF8, 0, strUTF8.c_str(), -1, nullptr, 0);
             unsigned short*wszGBK = new unsigned short[len + 1];
             memset(wszGBK, 0, len * 2 + 2);
             MultiByteToWideChar(CP_UTF8, 0, (LPCCH)strUTF8.c_str(), -1, (LPWSTR)wszGBK, len);
 
-            len = WideCharToMultiByte(CP_ACP, 0, (LPCWCH)wszGBK, -1, NULL, 0, NULL, NULL);
+            len = WideCharToMultiByte(CP_ACP, 0, (LPCWCH)wszGBK, -1, nullptr, 0, nullptr, nullptr);
             char *szGBK = new char[len + 1];
             memset(szGBK, 0, len + 1);
-            WideCharToMultiByte(CP_ACP, 0, (LPCWCH)wszGBK, -1, szGBK, len, NULL, NULL);
+            WideCharToMultiByte(CP_ACP, 0, (LPCWCH)wszGBK, -1, szGBK, len, nullptr, nullptr);
             std::string strTemp(szGBK);
             delete[]szGBK;
             delete[]wszGBK;

--
Gitblit v1.9.1