Changes:
1. Add/update tags.
2. According to the standard, several tags in
`Xmp.iptc.<property>` and `Xmp.iptcExt.<property>`, had been
wrongly added, as they only exist as part of a struct used by a
tag. The incorrect tags have been marked as deprecated in the
label and description.
3. Update existing test with translated output.
Ref: [IPTC Photo Metadata Standard 2021.1](https://www.iptc.org/std/photometadata/specification/IPTC-PhotoMetadata-2021.1.html)
Some descriptions of location properties contain the text "100%
overlap". When extracting text for translation, `xgettext`
misidentifies this as containing the C format string "% o", and tags it
as `c-format`. Translation tools that are sensitive to this will
require that translations contain matching format strings; since in this
case the format string is nonsensical, that is often not reasonably
possible. See:
https://answers.launchpad.net/launchpad/+question/698762
The description of the DotRange tag contains the text "0% dot and 100%
dot", which is similarly misidentified.
To fix this, inform `xgettext` that the messages do not contain C format
strings, as documented here (towards the end):
https://www.gnu.org/software/gettext/manual/html_node/c_002dformat-Flag.html
Current design on Windows was broken anyway, since legacy class `RWLock` does not implement a proper rwlock (shared read and exclusive write)
Once we are allowed using C++14 features, we can replace the `std::mutex` by `std::shared_timed_mutex` and the read-access locks by `std::shared_lock`.
Once we are allowed using C++17 features, we can replace the `std::mutex` by `std::shared_mutex` and the read-acces locks by `std::shared_lock`.
Found with modernize-loop-convert
Ran through git clang-format.
Also removed several questionable loops and replaced with simpler
algorithms.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Pimpl class Impl is stored in raw pointers which are allocated on the heap in
the constructor. However, the constructor can throw an exception resulting in a
memory leak as the destructor is **not** invoked.
=> A smart pointer is however properly deallocated.