]> git.lyx.org Git - lyx.git/commit
Avoid copying vector needlessly
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 2 Oct 2024 08:14:26 +0000 (10:14 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 3 Oct 2024 08:18:24 +0000 (10:18 +0200)
commit69d8435a7f373994025ae23e796c6c1a73295404
tree646dd24d18b250b434f31168e0bfb5615aa8289c
parent4af7cb045cefa50463192323b93168a41e61b535
Avoid copying vector needlessly

The getLabel method will not consider more than 10 citation keys.
Instead of removing elements from the keys vector, this commit adapts
the for loop to skip unwanted elements.

This allows to pass the keys vector by const reference.

Spotted by Coverity scan.
src/BiblioInfo.cpp
src/BiblioInfo.h