Commit Graph

7532 Commits

Author SHA1 Message Date
Rosen Penev
37fea97dd3 clang-tidy: use override
Found with modernize-use-override

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-06-27 10:29:52 +02:00
Rosen Penev
b84d8e9a44 clang-tidy: use auto
Found with modernize-use-auto

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-06-27 10:29:08 +02:00
Rosen Penev
9210fb85f9 clang-tidy: pass by value
Found with modernize-pass-by-value

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-06-27 10:28:36 +02:00
Kevin Backhouse
b16cd52b88 Replace sprintf with snprintf. 2021-06-27 10:27:54 +02:00
Rosen Penev
97cf02bf12 clang-tidy: remove redundant specifiers
Found with readability-redundant-access-specifiers

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-06-27 10:26:23 +02:00
Rosen Penev
430ff1c9b8 clang-tidy: replace throw with noexcept
Found with modernize-use-noexcept

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-06-27 10:25:52 +02:00
Rosen Penev
2fbf2e6b7c clang-tidy: remove dedundant initializer
Found with readability-redundant-member-init

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-06-27 10:24:31 +02:00
Kevin Backhouse
a4c5bdac19 fix: stricter date parsing in value.cpp (#1720)
* Regression test for issue 1713

* Stricter date parsing.

* Fix test failure caused by stdout mismatch.

(cherry picked from commit ab58026cff0e5edebc026261e9dc4b7db05b802d)
2021-06-27 10:21:38 +02:00
mergify[bot]
1d64f482ff
fix: use vector::at() rather than operator[] (backport #1735) (#1741)
* fix: use vector::at() rather than operator[] (#1735)

* Regression test for https://github.com/Exiv2/exiv2/issues/1706

* Use vector::at() rather than operator[].

* Print to stderr when exception is caught and EXIV2_DEBUG_MESSAGES is enabled.

* Check that it prints "Bad value" for the date.

(cherry picked from commit f4d3adbf91e6dc4e34aee5bac7b7fd9e127a5c00)

# Conflicts:
#	src/value.cpp

* fix merge conflicts from mergify backport

Co-authored-by: Kevin Backhouse <kevinbackhouse@github.com>
Co-authored-by: Christoph Hasse <hassec@users.noreply.github.com>
2021-06-27 09:33:56 +02:00
Kevin Backhouse
2b84f4bd64
fix: zero initialize local variables. (#1743)
* Zero initialize local variables.

* Initialize xmpID_
2021-06-27 08:56:31 +02:00
Robin Mills
fe83c739a2
Merge pull request #1738 from Exiv2/exifprint_lint2
exifprint_lint
2021-06-25 13:08:03 +01:00
Robin Mills
6e638e7a40 Fix python test code to run on Windows. 2021-06-25 08:11:47 +01:00
Robin Mills
6452a9ce36 Fixing typos. 2021-06-24 17:49:47 +01:00
Robin Mills
739673335c Forgive "SHORT or LONG" tags. Add test code. 2021-06-24 09:49:22 +01:00
Robin Mills
fd2ab89de5 exifprint_lint 2021-06-23 14:24:46 +01:00
Kevin Backhouse
3e099da7b7 Remove obsolete snprintf macros. 2021-06-22 18:25:52 +02:00
Christoph Hasse
2539e5dd7e fix: change duplicated Canon RF 100-500 2x into missing 1.4 teleconverter version 2021-06-22 09:47:02 +02:00
Christoph Hasse
704ee571de fix: allow for FX.Y syntax in aperture regex 2021-06-22 09:47:02 +02:00
Daniel Vogelbacher
fa78ab3593 Use official Canon RF lens model names
The new RF line is named F2.8L instead of f/2.8L (for example).

This patch makes the model names identically to the official
Canon lens names and the same names exiftool uses.
2021-06-22 09:47:02 +02:00
Rosen Penev
4a654e4266 clang-tidy: do not use 0 for bool
Found with modernize-use-bool-literals

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-06-21 21:00:05 +02:00
Rosen Penev
99823a526c clang-tidy: replace virtual with override
Found with modernize-use-override

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-06-21 20:59:48 +02:00
Christoph Hasse
653c5696d4
Merge pull request #1714 from attilaolah/patch-1
fix: compilation with -Wunused-variable
2021-06-21 20:24:52 +02:00
Antonio Rojas
c069e36605 Fix build with gtest 1.11
INSTANTIATE_TYPED_TEST_CASE_P requires a non-empty prefix now
2021-06-20 23:05:34 +02:00
Christoph Hasse
2f83b7e0f6
Merge pull request #1692 from Exiv2/hassec_canon_lens_test
New Canon Lens Identification + Automatic Test of all Lenses
2021-06-20 22:28:34 +02:00
andyrtr
cfeceee416
add lens: Olympus M.ZUIKO DIGITAL ED 12-45mm F4.0 PRO (#1725)
* add lens ID for Olympus M.Zuiko Digital ED 12-45mm F4.0 Pro #1723

* add test for #1723 checking the Olympus M.Zuiko Digital ED 12-45mm F4.0 Pro recognized correctly
2021-06-20 22:15:01 +02:00
Attila Oláh
33419c8dd1
Fix compilation with -Wunused-variable
When compiling with -Wunused-variable, `EXT_STRERROR_R_CHAR_P` gets undefined because of a failing compilation check.

An alternative would be to mark `c` as `__attribute__((undefined))`, but MSVC doesn't have `__attribute__((undefined))`.
2021-06-14 12:41:47 +00:00
Rosen Penev
19000cd53c con/destructor fixes
Added = delete to make it explicit. Also made them public.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-06-10 18:08:11 +02:00
Rosen Penev
7a2b05e813 clang-tidy: use = default
Found with modernize-use-equals-default

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-06-10 18:01:48 +02:00
Rosen Penev
e53548a95a clang-tidy: use default member init
Found with modernize-use-default-member-init

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-06-10 18:00:23 +02:00
Rosen Penev
17a8d743a5 clang-tidy: do not use else after return
Found with llvm-else-after-return

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-06-10 17:45:29 +02:00
Rosen Penev
e9309f25ab clang-tidy: simplify bools
Found with readability-simplify-boolean-expr

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-06-10 17:45:02 +02:00
Rosen Penev
c20394b3fa remove old MSVC hacks
This is C++11 now.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-06-10 17:35:17 +02:00
nulllinie
23dbf4f51a
correct identification for Tamron SP 24-70mm G2 A032 (#1691)
* correct identification for Tamron SP 24-70mm G2 A032 with LensType 0E (14)

Existing entry with LensType 4E is kept as it's needed as well
Added testcase for LensType 0E for Tamron_SP_24-70mm_F2.8_Di_VC_USD_G2
2021-06-10 09:01:38 +02:00
Christoph Hasse
a6b1126f6d fix: workaround centos-8 bug-18212 2021-06-09 21:00:06 +02:00
Moshe Kaplan
aeb3ea9412 Update README.md
Fix typo
2021-06-09 08:17:44 +02:00
Christoph Hasse
efb0af8506 fix: make casts explicit to please msvc 2021-06-08 23:33:03 +02:00
Christoph Hasse
7867343611 fix: prefer symbolic boolean operators so windows is happy 2021-06-08 23:03:28 +02:00
Christoph Hasse
7bc9c01d95 fix: update tests following new canon lens identification 2021-06-08 22:35:45 +02:00
Christoph Hasse
20cff55cd8 fix: fix bash test following the new canon lens identification 2021-06-08 22:25:07 +02:00
Christoph Hasse
bdd8a386b5 feat: improve lens recognition of canon makernote
If multiple choices are possible they are now all reported. This
behaviour is now the same as it is in exiftool.

All lenses are tested in the new test_canon_lenses.py test
2021-06-08 21:56:04 +02:00
Christoph Hasse
f8962224fd fix: prevent creation of nightly release with draf==true
Sometime the nightly pre-release would be in "draft" status on github.
It's hard to reproduce but I had the guess that maybe the deletion of
old tag and release on the github side wasn't quite done when the
new release was being created. Of course only speculation...
But, moving the download of the artifacts in betweent these two steps
seems to have fixed the symptom.
2021-06-04 15:50:53 +02:00
Christoph Hasse
907fe2369e fix: readd some previously removed lenses now that we plan to trea ambiguous lenses 2021-06-03 21:40:05 +02:00
Christoph Hasse
cc89dca5a2 feat: rework lens test to account for ambiguous lenses
For each lens, its test target is now defined as the list of all lenses
which are possible given that lenses exif values.
2021-06-03 00:03:06 +02:00
Christoph Hasse
a70896c1ac refactor: use function to calculate raw exif value given aperture 2021-06-02 21:36:13 +02:00
Christoph Hasse
4ee8962d42 refactor!: use lensfun style nameing for lenses 2021-06-02 21:21:35 +02:00
Christoph Hasse
47d518bc65 refactor: move canon lens tests into new test directory
This commit does some restructuring to make common utils available
for future similar test for other brands
2021-06-02 21:21:35 +02:00
Alexander Steffen
56f9979a4b Improve detection of Canon lenses with TC
Lenses with and without a TC may share the same lens ID. Prefer entries
that explicitly mention the TC.
2021-06-02 21:21:35 +02:00
Alexander Steffen
9962b88db3 Fix misdetection of Tamron SP AF 300mm as Canon EF 75-300mm
When searching for the Tamron lens, only the string "300mm" is searched in
the lens description, which also happens to be present for the Canon lens.
Since the Canon lens comes first in the list, it wins. Fix this issue by
prefixing the search string with a single space so it always has to match
the full focal length specification.
2021-06-02 21:21:35 +02:00
Alexander Steffen
477150f067 Fix rounding error in fnumber calculation
The mathematical calculation of fnumbers does not always match the expected
values: For example for f/3.5 the precise mathematical value is 3.564...,
which gets rounded to 3.6. Fix this special case by returning a value
closer to the expected value.
2021-06-02 21:21:35 +02:00
Alexander Steffen
d7f613c48e Clean up Canon lens list
Fixes some small inconsistencies, so that all lenses use the same format,
that is also shared with other lens databases such as lensfun:
* Always prefix aperture with f/
* Never add .0 to aperture
* Always add mm to focal length
* Always use | A for Sigma Art lenses
2021-06-02 21:21:35 +02:00