# HG changeset patch # User David Barts # Date 1579380926 28800 # Node ID d832c7b2bfd0c06c5e3976b56c016ad9fa54759e # Parent debe0413280f76d9aa6f1295873cea92c1395134 Clean out some deadwood. diff -r debe0413280f -r d832c7b2bfd0 src/name/blackcap/clipman/PasteboardQueue.kt --- a/src/name/blackcap/clipman/PasteboardQueue.kt Sat Jan 18 12:31:53 2020 -0800 +++ b/src/name/blackcap/clipman/PasteboardQueue.kt Sat Jan 18 12:55:26 2020 -0800 @@ -32,7 +32,7 @@ get() { return _maxSize } @Synchronized set(value) { _maxSize = value - truncate(false) + truncate() } /** @@ -53,13 +53,13 @@ } } queue.addLast(item) - truncate(true) + truncate() } - private fun truncate(forceValidate: Boolean) { + private fun truncate() { if (_maxSize > 0) { var size = queue.size - var dirty = forceValidate + var dirty = false while (size > _maxSize) { var extra = queue.removeFirst().component inSwingThread { parent.remove(extra) }