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.
Instead of passing the vector by value so that stuff can be added to
it in the function, add required elements of arguments to a second vector.
While we are at it, simplify the code a bit by using a range-for and
auto keyword.
Spotted by Coverity scan
1. The --safe option has been removed with lilypond 2.24 and causes
the program to error out
2. We default to PDF output (and pdflatex) if no program is explicitly
given, since latex generates *.eps snippets which fail to convert
on many recent systems due to security measures
Typically, to check whether an element is present and set to true, instead of
foo.find(c) != foo.end() && foo.find(c)->second
one uses
foo[c]
The map<> code creates elements automatically when they do not exist
and zero-initializes them.
This avoids puzzlement of Coverity scan when seeing that find() result
is dereferenced without checking that it is not equal to end().
Moreover, this makes the code much much clearer. I still do not
understand it, though ;)
According to cmake warning output while configuring:
CMake Error (dev) at po/CMakeLists.txt:72 (ADD_CUSTOM_COMMAND):
The following keywords are not supported when using
add_custom_command(OUTPUT): PRE_BUILD.
Policy CMP0175 is not set: add_custom_command() rejects invalid arguments.
Run "cmake --help-policy CMP0175" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.
Call Stack (most recent call first):
po/CMakeLists.txt:106 (add_gettext_python)
This error is for project developers. Use -Wno-error=dev to suppress it.
In export.cmake, if the detected output format is pdf3, we try to
export to "platex", which usually makes sense, but for this file we
would need to export to "latex". This file is very particular, and
also old, so I do not know if it is worth the time to handle this
case.
This commit inverts the following tests:
export/examples/Articles/Chess/Game_1_lyx16 (Failed)
export/examples/Articles/Chess/Game_1_lyx20 (Failed)
export/examples/Articles/Chess/Game_1_lyx21 (Failed)
export/examples/Articles/Chess/Game_1_lyx22 (Failed)
export/examples/Articles/Chess/Game_1_lyx23 (Failed)
These fail when exporting to TeX, but since they have to do with old
formats, it's not clear it's worth the time to investigate.
These started failing once we check the exit code of LyX's TeX
export (at c7be9780).
Now that we detect and export to the correct TeX format (instead of
assuming pdflatex), we can make the check more strict by giving an
error if LyX exits with error from the export.
This fixes the following tests:
export/examples/ja/Modules/Rnw_%28knitr%29_lyx22
export/examples/ja/Modules/Rnw_%28knitr%29_lyx23
export/examples/ja/Modules/Sweave_lyx22
export/examples/ja/Modules/Sweave_lyx23