From fa0eaad4f90c29a582c66ca317e83892dbd14da5 Mon Sep 17 00:00:00 2001 From: gb <741021719@qq.com> Date: Fri, 25 Nov 2022 14:36:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DBUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sane/scanned_img.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sane/scanned_img.h b/sane/scanned_img.h index 3df550e..6f93bfe 100644 --- a/sane/scanned_img.h +++ b/sane/scanned_img.h @@ -114,6 +114,7 @@ class safe_queue std::mutex lock_; std::vector queue_; size_t bytes_; + T empty_; public: safe_queue() : bytes_(0) @@ -157,6 +158,8 @@ public: if (first) first(t.t); } + else + t.t = empty_; return t.t; }