summaryrefslogtreecommitdiff
path: root/src/lib/writer.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-03-21 13:34:33 +0100
committerCarl Hetherington <cth@carlh.net>2025-03-22 13:29:59 +0100
commitfb1bda83c7e03ec27ca5faeaf10ba2c0b8b0d3b6 (patch)
tree68c8a2694f179cab16cf174287adf0a53bbcfcfc /src/lib/writer.cc
parentd13d57f0bc12ba0d4c54cb106467fb0c9a5808e6 (diff)
Simplify conditions.
Only Type::FULL can have non-null encoded, so I don't think there's any point in checking for both things.
Diffstat (limited to 'src/lib/writer.cc')
-rw-r--r--src/lib/writer.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/writer.cc b/src/lib/writer.cc
index 563a86e80..3061f36d4 100644
--- a/src/lib/writer.cc
+++ b/src/lib/writer.cc
@@ -423,7 +423,7 @@ try
auto qi = _queue.front ();
_last_written[qi.reel].update (qi);
_queue.pop_front ();
- if (qi.type == QueueItem::Type::FULL && qi.encoded) {
+ if (qi.encoded) {
--_queued_full_in_memory;
}
@@ -464,7 +464,7 @@ try
/* Find one from the back of the queue */
_queue.sort ();
auto item = _queue.rbegin();
- while (item != _queue.rend() && (item->type != QueueItem::Type::FULL || !item->encoded)) {
+ while (item != _queue.rend() && !item->encoded) {
++item;
}