Commit Graph

7482 Commits

Author SHA1 Message Date
Alexander Steffen
0d030eefdf Remove undetectable lenses
Lenses that have the exact same ID, focal length and aperture as some other
lens that comes earlier in the list (and thus always wins):
* 137, "Tamron SP 17-50mm f/2.8 XR Di II VC"
* 137, "Tamron SP 24-70mm f/2.8 Di VC USD"
* 161, "Sigma 28-70mm f/2.8 EX"
* 173, "Sigma 180mm EX HSM Macro f/3.5"
* 180, "Zeiss Milvus 50mm f/1.4"
* 183, "Sigma 150-600mm f/5-6.3 DG OS HSM | S"
* 254, "Tamron SP 90mm f/2.8 Di VC USD Macro 1:1 F004"
* 254, "Tamron SP 90mm f/2.8 Di VC USD Macro 1:1 F017"

Lenses that share their IDs with other lenses, but have no or an
unsupported focal length:
* 33, "Voigtlander or Carl Zeiss Lens"
* 131, "Sigma 4.5mm f/2.8 EX DC HSM Circular Fisheye"
2021-06-02 21:21:35 +02:00
Alexander Steffen
fa4ce38d77 Execute test commands always with shell
There is no need to handle tests on Windows and Unix differently here.
Always using a shell allows for more flexibility when writing tests.

(rebased by hassec)
2021-06-02 21:21:35 +02:00
Alexander Steffen
73efa4515c Add test for all known Canon lenses
Generates a test case for every known lens from canonCsLensType, that first
sets the corresponding lens metadata and then verifies that exiv2 maps it
to the expected lens description. Only metadata fields that are relevant
for lens identification are modified.
2021-06-02 21:21:35 +02:00
Luis Díaz Más
f30022d73d
Fix issues detected with PVS-Studio + other little improvements (#1689)
* avoid re-declaration of constant variables

* Replace pthreads critical section with std::mutex

* ci - better naming

* cmake - increase minimum version to 3.11. Use project DESCRIPTION

* fix - do not treat string::find() return type as bool

* remove conditions that were always true

* remove condition that were always false

* Remove EXV_HAVE_GMTIME_R which is not used anymore

* pixelWidth_ was inherited from Exiv2::Image

The width & height variables in the TiffImage class need to be mutable
to be able to change their values on the getters pixelHeight() and
pixelWidth() ... Do not ask me why ...

* Remove superfluous if

* pvs:V766 item with identical key added already

* pvs:V730 not all members were initialized (time)

* pvs:V730 not all members are initialized

* pvs:v668 no point in testing pointer against null after new

* pvs:V1048 variable assigned the same value

* replace c-style dynamic vector with std one

* pvs:547 fakeData is always true

* Remove useless constructor in derived class

* pvs:V690 modern way to disable copy-ctor

* Replace malloc/free with new/delete. No need to check for null

* pvs:V1028 cast operands and not result

* Remove custom MIN/MAX functions

* pvs:V595 pointer used before verified against null

* pvs: index used before being checked

* pvs:V1028 possible overflow. Cast operands

* pvs:v575 potential null pointer passed to other functions

* pvs:V547 deal with always true/false expressions

* pvs:V560 part of conditional expressions always false or true

* pvs:V701 possible break in realloc -> move to std::vector

* Make some classes 'final'

* Replace sprintf with std::to_string()

* fix compilation on windows
2021-06-01 12:39:10 +02:00
Christoph Hasse
024830a72c
feat: Setup github actions workflow to build tagged release and nightly pre-release (#1676) 2021-05-31 16:50:11 +02:00
Christoph Hasse
758dd6bbc6 refactor!: remove free() function from DataBuf to avoid potential problems, see #1542 2021-05-27 08:26:00 +02:00
Rosen Penev
2c57f214c5 clang-tidy: use nullptr
Found with modernize-use-nullptr

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-26 08:31:45 +02:00
Christoph Hasse
8c61962a09
docs: fix example command in man pages. closes #1685 (#1686) 2021-05-25 21:54:34 +02:00
Rosen Penev
86c71ae6c3 clang-tidy: avoid global non const variables
Found with cppcoreguidelines-avoid-non-const-global-variables

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-25 08:43:27 +02:00
Rosen Penev
d1e116a8ef remove some pointless std::set
Partially found by gcc's -fanalyzer

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-25 08:29:51 +02:00
Rosen Penev
4c4f8da338 remove initializers
these were moved outside the constructor body.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-22 10:02:20 +02:00
Rosen Penev
c7a41230f0 clang-tidy: remove pointless member init
Found with readability-redundant-member-init

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-19 23:32:29 -07:00
Rosen Penev
e5894d71e1 default con/destructors in headers
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-19 23:31:50 -07:00
Rosen Penev
7179300b7f clang-tidy: use dynamic cast
Found with cppcoreguidelines-pro-type-static-cast-downcast

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-19 23:31:22 -07:00
Rosen Penev
8d501fcf24 clang-tidy: no else after return
Found with readability-else-after-return

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-19 23:09:46 -07:00
Rosen Penev
ce47de67b5 use auto in template
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-19 23:09:05 -07:00
Rosen Penev
c44c289d76 clang-tidy: fix ending namespace comnments
Found with llvm-namespace-comment

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-19 23:08:08 -07:00
Rosen Penev
a74bceacb0 clang-tidy: remove pointless return
Found with readability-redundant-control-flow

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-19 23:07:45 -07:00
Rosen Penev
ceed79c95e Jzon: algorithm conversions
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-20 07:37:00 +02:00
Rosen Penev
4d2bc3c752 some range loop conversions
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-20 07:37:00 +02:00
Rosen Penev
743da1a564 clang-tidy: use C++ casting
Found with google-readability-casting

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-20 07:29:02 +02:00
Rosen Penev
8dbc699858 clang-tidy: add missing explicit
Found with google-explicit-constructor

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-19 16:48:44 +02:00
Rosen Penev
ff39473c18 clang-tidy: convert to static
Found with readability-convert-member-functions-to-static

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-19 14:45:20 +02:00
Rosen Penev
6da49fd29b more constexpr
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-19 14:11:42 +02:00
Rosen Penev
cdbee3c26c clang-tidy: init in member initializer
Found with cppcoreguidelines-prefer-member-initializer

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-19 14:11:42 +02:00
Rosen Penev
036af68a71 remove pointless constructors
Replaced with Uniform initialization. Allows constexpr usage.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-19 14:11:42 +02:00
Luis Díaz Más
b83b2197c1 ci - Linux distros jobs being more explicit about options used 2021-05-18 14:39:17 +02:00
Luis Díaz Más
0d45de7519 ci - Replace debian:9 with debian:10 2021-05-18 14:39:17 +02:00
Luis Díaz Más
b54ade76ab Python3 dependency is not obligatory
Some of the CI-Linux-Distros jobs failed because of this. Python3 is not
available by default on Debian:9 nor in Centos:8.

Since we are not currently running the tests in those platforms, and
python3 is just used for testing, we do not want to enforce this project
dependency.
2021-05-18 14:39:17 +02:00
Rosen Penev
8564d0b394 clang-tidy: pass by value
Found with modernize-pass-by-value

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-18 14:30:08 +02:00
Rosen Penev
f9d394adf0 clang-tidy: run through performance checks
Found with performance*

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-18 14:30:08 +02:00
Rosen Penev
b8712188bb clang-tidy: use auto
Found with modernize-use-auto

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-17 21:52:03 +02:00
Rosen Penev
20dfab8036 manual for range loop conversions
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-17 10:30:42 +02:00
Rosen Penev
8e52032ee0 clang-tidy: range loop conversions
Found with: modernize-loop-convert

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-17 08:53:39 +02:00
Luis Díaz Más
44256e8c5d ci - Win matrix jobs will also run on:push for main
The idea is to generate a conan cache on main that could be reused in
future PRs to main.
2021-05-17 07:31:45 +02:00
Luis Díaz Más
9241f60880 win - Only run tests on x64
On CI, pythonTests fail more or less consistently in the configuration
Arch:x86, BuildType:Relase, Shared:ON. I tried to reproduce this locally,
but I could not.

Since Win-x86 is marginal for Exiv2, we disable it from CI until
somebody raise concerns about it.
2021-05-17 07:31:45 +02:00
Luis Díaz Más
59a80eba2e mac - cmake_paths does not work directly on mac 2021-05-17 07:31:45 +02:00
Luis Díaz Más
4c5c8538f5 Ignore missing PDBs 2021-05-17 07:31:45 +02:00
Luis Díaz Más
08672dbea3 make win debug builds a bit faster 2021-05-17 07:31:45 +02:00
Luis Díaz Más
6c2141959a conan - change generator to be able to use latest expat version 2021-05-17 07:31:45 +02:00
Luis Díaz Más
668001a72d BMFF python test - Output strings in different lines 2021-05-17 07:31:45 +02:00
Luis Díaz Más
6b6ffd02a7 fix python tests on powershell 2021-05-17 07:31:45 +02:00
Luis Díaz Más
9710ebe5f0 cmake - Use cmake -E to be able to run tests on different windows shells 2021-05-17 07:31:45 +02:00
Luis Díaz Más
4f057a84ee ci - Win builds without unicode + with warnings as errors 2021-05-17 07:31:45 +02:00
Luis Díaz Más
7aa5260af5 cmake: remove obsolete targets 2021-05-17 07:31:45 +02:00
Luis Díaz Más
64eb95a16f cmake: find python3 and use it in tests 2021-05-17 07:31:45 +02:00
Kevin Backhouse
ee3b8d1fc2 Fix quadratic complexity performance bug.
(cherry picked from commit c261fbaa2567687eec6a595d3016212fd6ae648d)
2021-05-16 19:45:34 +02:00
Rosen Penev
c73dfa0106 clang-tidy: use uppercase numeric literals
Found with readability-uppercase-literal-suffix

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-16 11:27:49 +02:00
Rosen Penev
8e178e912e replace {} initialization with fill
Old compilers don't implement {} correctly.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-16 11:27:10 +02:00
Luis Díaz Más
34945e39c4 ci - Use CTest for coverage builds 2021-05-15 19:03:14 +02:00