From 8a8d60d5786510ec7b1dd4f622e848de8a15f8a8 Mon Sep 17 00:00:00 2001
From: 雾聪 <wucong.lyb@alibaba-inc.com>
Date: 星期一, 15 一月 2024 16:36:51 +0800
Subject: [PATCH] replace NULL for onnxruntime/src

---
 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