From 758b0072afc10966d75b753e75102d94a3127af3 Mon Sep 17 00:00:00 2001 From: Hu Chunming <2657262686@qq.com> Date: Wed, 6 Aug 2025 15:51:43 +0800 Subject: [PATCH] 代码优化 --- src/reprocessing_module/save_snapshot_reprocessing.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/reprocessing_module/save_snapshot_reprocessing.cpp b/src/reprocessing_module/save_snapshot_reprocessing.cpp index 3b1d1cb..ae48c71 100644 --- a/src/reprocessing_module/save_snapshot_reprocessing.cpp +++ b/src/reprocessing_module/save_snapshot_reprocessing.cpp @@ -104,12 +104,10 @@ void save_snapshot_reprocessing::save_img_process() { bool bPost = false; if(!cur_image.file_path.empty()){ - bool bSaved = jpegUtil.jpeg_encode(cur_image.img_info.pic_desc, cur_image.file_path); - if(!bSaved){ + bPost = jpegUtil.jpeg_encode(cur_image.img_info.pic_desc, cur_image.file_path); + if(!bPost){ LOG_ERROR("jpeg_encode failed"); - } else { - bPost = true; - } + } } else { bPost = true; } -- libgit2 0.21.4