aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/model/GFDataExchanger.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2024-07-26 16:41:17 +0000
committersaturneric <[email protected]>2024-07-26 16:41:17 +0000
commitca3a64b4a53d85f9b9ce7c3e9a93ae06affa158b (patch)
tree0f779c36b9b924da8af602cfaa00f4da5cf80103 /src/core/model/GFDataExchanger.cpp
parentfix: clean up warnings (diff)
downloadGpgFrontend-ca3a64b4a53d85f9b9ce7c3e9a93ae06affa158b.tar.gz
GpgFrontend-ca3a64b4a53d85f9b9ce7c3e9a93ae06affa158b.zip
fix: indirect memory leak issues
Diffstat (limited to 'src/core/model/GFDataExchanger.cpp')
-rw-r--r--src/core/model/GFDataExchanger.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/model/GFDataExchanger.cpp b/src/core/model/GFDataExchanger.cpp
index d847b65d..c0da517d 100644
--- a/src/core/model/GFDataExchanger.cpp
+++ b/src/core/model/GFDataExchanger.cpp
@@ -42,8 +42,10 @@ auto GFDataExchanger::Write(const std::byte* buffer, size_t size) -> ssize_t {
not_empty_.notify_all();
}
- not_full_.wait(lock,
- [=] { return queue_.size() < queue_max_size_ || close_; });
+ not_full_.wait(lock, [=] {
+ return queue_.size() < static_cast<unsigned long>(queue_max_size_) ||
+ close_;
+ });
if (close_) return -1;
queue_.push(buffer[i]);