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/bias-lm.h |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/runtime/onnxruntime/src/bias-lm.h b/runtime/onnxruntime/src/bias-lm.h
index 957197a..ddaf3e4 100644
--- a/runtime/onnxruntime/src/bias-lm.h
+++ b/runtime/onnxruntime/src/bias-lm.h
@@ -48,7 +48,7 @@
     std::vector<std::vector<int>> split_id_vec;
 
     struct timeval start, end;
-    gettimeofday(&start, NULL);
+    gettimeofday(&start, nullptr);
 
     LoadCfgFromYaml(cfg_file.c_str(), opt_);
     while (getline(ifs_hws, line)) {
@@ -86,7 +86,7 @@
     BuildGraph(split_id_vec, custom_weight);
     ifs_hws.close();
 
-    gettimeofday(&end, NULL);
+    gettimeofday(&end, nullptr);
     long seconds = (end.tv_sec - start.tv_sec);
     long modle_init_micros = ((seconds * 1000000) + end.tv_usec) - (start.tv_usec);
     LOG(INFO) << "Build bias lm takes " << (double)modle_init_micros / 1000000 << " s";
@@ -99,7 +99,7 @@
     std::vector<std::vector<int>> split_id_vec;
 
     struct timeval start, end;
-    gettimeofday(&start, NULL);
+    gettimeofday(&start, nullptr);
     opt_.incre_bias_ = inc_bias;
     for (const pair<string, int>& kv : hws_map) {
       float score = 1.0f;
@@ -128,7 +128,7 @@
     }
     BuildGraph(split_id_vec, custom_weight);
 
-    gettimeofday(&end, NULL);
+    gettimeofday(&end, nullptr);
     long seconds = (end.tv_sec - start.tv_sec);
     long modle_init_micros = ((seconds * 1000000) + end.tv_usec) - (start.tv_usec);
     LOG(INFO) << "Build bias lm takes " << (double)modle_init_micros / 1000000 << " s";

--
Gitblit v1.9.1