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.cpp |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/runtime/onnxruntime/src/encode_converter.cpp b/runtime/onnxruntime/src/encode_converter.cpp
index 6c1097e..2ba6109 100644
--- a/runtime/onnxruntime/src/encode_converter.cpp
+++ b/runtime/onnxruntime/src/encode_converter.cpp
@@ -441,7 +441,7 @@
 }
 
 bool EncodeConverter::IsAllChineseCharactor(const U8CHAR_T* pu8, size_t ilen) {
-    if (pu8 == NULL || ilen <= 0) {
+    if (pu8 == nullptr || ilen <= 0) {
         return false;
     }
 
@@ -458,7 +458,7 @@
 }
 
 bool EncodeConverter::HasAlpha(const U8CHAR_T* pu8, size_t ilen) {
-  if (pu8 == NULL || ilen <= 0) {
+  if (pu8 == nullptr || ilen <= 0) {
     return false;
   }
   for (size_t i = 0; i < ilen; i++) {
@@ -471,7 +471,7 @@
 
 
 bool EncodeConverter::IsAllAlpha(const U8CHAR_T* pu8, size_t ilen) {
-  if (pu8 == NULL || ilen <= 0) {
+  if (pu8 == nullptr || ilen <= 0) {
     return false;
   }
   for (size_t i = 0; i < ilen; i++) {
@@ -483,7 +483,7 @@
 }
 
 bool EncodeConverter::IsAllAlphaAndPunct(const U8CHAR_T* pu8, size_t ilen) {
-  if (pu8 == NULL || ilen <= 0) {
+  if (pu8 == nullptr || ilen <= 0) {
     return false;
   }
   bool flag1 = HasAlpha(pu8, ilen);
@@ -500,7 +500,7 @@
 }
 
 bool EncodeConverter::IsAllAlphaAndDigit(const U8CHAR_T* pu8, size_t ilen) {
-  if (pu8 == NULL || ilen <= 0) {
+  if (pu8 == nullptr || ilen <= 0) {
     return false;
   }
   bool flag1 = HasAlpha(pu8, ilen);
@@ -516,7 +516,7 @@
   return true;
 }
 bool EncodeConverter::IsAllAlphaAndDigitAndBlank(const U8CHAR_T* pu8, size_t ilen) {
-  if (pu8 == NULL || ilen <= 0) {
+  if (pu8 == nullptr || ilen <= 0) {
     return false;
   }
   for (size_t i = 0; i < ilen; i++) {
@@ -529,7 +529,7 @@
 bool EncodeConverter::NeedAddTailBlank(std::string str) {
   U8CHAR_T *pu8 = (U8CHAR_T*)str.data();
   size_t ilen = str.size();
-  if (pu8 == NULL || ilen <= 0) {
+  if (pu8 == nullptr || ilen <= 0) {
     return false;
   }
   if (IsAllAlpha(pu8, ilen) || IsAllAlphaAndPunct(pu8, ilen) || IsAllAlphaAndDigit(pu8, ilen)) {

--
Gitblit v1.9.1