From 58b552388fd10787f1807558c0d4bf607bc95c88 Mon Sep 17 00:00:00 2001 From: Chester Liu <4710575+skyline75489@users.noreply.github.com> Date: Thu, 20 Jun 2024 08:20:30 +0800 Subject: [PATCH] Fix several C5038 warnings (#748) --- include/ort_c_to_cpp.h | 2 +- shared/api/image_processor.cc | 2 +- shared/api/runner.hpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/ort_c_to_cpp.h b/include/ort_c_to_cpp.h index 92c2fb01..7969f080 100644 --- a/include/ort_c_to_cpp.h +++ b/include/ort_c_to_cpp.h @@ -343,8 +343,8 @@ struct BaseKernel { OrtErrorCode GetErrorCodeAndRelease(OrtStatusPtr status) const noexcept; const OrtApi& api_; - OrtW::CustomOpApi ort_; const OrtKernelInfo& info_; + OrtW::CustomOpApi ort_; }; // Deprecated: Use OrtW::CustomOpApi::KernelInfoGetAttribute instead diff --git a/shared/api/image_processor.cc b/shared/api/image_processor.cc index 02801597..9ecedf91 100644 --- a/shared/api/image_processor.cc +++ b/shared/api/image_processor.cc @@ -85,7 +85,7 @@ OrtxStatus ImageProcessor::Init(std::string_view processor_def) { } ImageProcessor::ImageProcessor() - : allocator_(&CppAllocator::Instance()), OrtxObjectImpl(kOrtxKindProcessor) { + : OrtxObjectImpl(kOrtxKindProcessor), allocator_(&CppAllocator::Instance()) { } template diff --git a/shared/api/runner.hpp b/shared/api/runner.hpp index b3170e0a..ba599140 100644 --- a/shared/api/runner.hpp +++ b/shared/api/runner.hpp @@ -278,8 +278,8 @@ class OrtxRunner { } private: - std::vector ops_; ortc::IAllocator* allocator_; + std::vector ops_; }; } // namespace ort_extensions