Commit Graph

4150 Commits

Author SHA1 Message Date
Rosen Penev
e309680a86 remove deleted members from static classes
This is a holdover from C++98. No need anymore

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-02-05 22:38:44 -08:00
Rosen Penev
6a34d9e57d add missing member functions
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-02-05 22:38:44 -08:00
Rosen Penev
ddb42eb159 remove some overriden defaulted destructors
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-02-05 22:38:44 -08:00
Rosen Penev
d248e1a2af more delete removals
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-02-05 22:38:44 -08:00
Rosen Penev
e7977554e2 default initializations
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-02-05 22:38:09 -08:00
Rosen Penev
7aaf6414f2 move initialization up
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-02-05 22:38:09 -08:00
Rosen Penev
0d353ac5f3 work around windows.h min/max macros
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-02-03 23:27:11 -08:00
Rosen Penev
b8d4b9c6ea remove manual math
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-02-03 07:21:13 -08:00
Rosen Penev
d874fc4dd8 use __has_include
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-01-29 12:21:47 -08:00
Rosen Penev
376638259d namespace enforce.hpp functions to Internal
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-01-29 11:14:59 -08:00
Rosen Penev
77834807c2 add support for gcc and clang 7
Uses std::experimental::filesystem

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-01-29 09:29:46 -08:00
Rosen Penev
e19ec79f98 safe_op: C++17 improvements
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-01-29 08:46:02 -08:00
Rosen Penev
54dd2b54a5 clang-tidy: add const to parameter
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-01-29 08:45:33 -08:00
Rosen Penev
2a690a135b use gnu_printf
Fixes warning under MinGW:

warning: unknown conversion type character 'z' in format [-Wformat=]

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-01-28 10:44:16 -08:00
Rosen Penev
a7a9835431 more std::find to Exiv2::find
The latter is simpler.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-01-27 07:47:18 -08:00
Rosen Penev
7fd7ee62a3 std::find to find template
std::find in C++20 can use ranges, which is equivalent here. Less error
prone.

Namespace is properly to avoid any conflicts with std::find or others

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-01-27 07:47:18 -08:00
Miloš Komarčević
0075ff631c
Merge pull request #2471 from Exiv2/pc_improve
Improve pkg-config file generation
2023-01-27 15:33:06 +01:00
Rosen Penev
34318260ea fix C++20 deprecation warning
Capturing this with = is deprecated.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-01-27 06:07:42 -08:00
Miloš Komarčević
15f0119707 Switch to CMake provided FindIconv 2023-01-27 09:29:15 +01:00
Miloš Komarčević
63f9926378 Add static linkages to pkg-config file 2023-01-27 09:29:15 +01:00
Rosen Penev
6976aab5bd replace substr with resize/pop_back
Shorter and more efficient.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-01-26 22:44:43 -08:00
Rosen Penev
dd445e6c8d use find instead of count
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-01-26 22:44:43 -08:00
Rosen Penev
0169739a4e add missing const
Found with cppcheck

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-01-26 22:44:43 -08:00
Rosen Penev
aefd901bef fix copy constructors
clang-tidy couldn't transform these because of missing members

Found with cppcheck.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-01-26 22:44:43 -08:00
Kevin Backhouse
b55a0a564a
Silence unused parameter warning when EXV_ENABLE_INIH is undefined. 2023-01-17 08:51:12 +00:00
Kevin Backhouse
43c9ec0f50
Add EXIV2_ENABLE_INIH flag to enable building without libinih. 2023-01-16 10:33:25 +00:00
Rosen Penev
842ef05ee6 return nullptr instead of reset
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-01-05 23:29:31 -08:00
Rosen Penev
ce8691bba3 remove double libintl check
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-01-05 23:29:31 -08:00
Rosen Penev
d6e1b90a23 avoid reassignment
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-01-05 23:29:31 -08:00
Rosen Penev
dd3b3d4ff4 add const
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-01-05 23:29:31 -08:00
Rosen Penev
3e97850e97 manual default member init
clang-tidy suggests this but fails to apply it.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-01-05 23:29:31 -08:00
Mohamed Ali Chebbi
1c764358bb
Encapsulate video support with compilation variable EXV_ENABLE_VIDEO (#2448)
* Encapsulate video support with compilation variable EXV_ENABLE_VIDEO

* Encapsulate video support with compilation variable EXV_ENABLE_VIDEO: add variable to unit test files

* Encapsulate video support with compilation variable EXV_ENABLE_VIDEO: encapsulate in makefile

* Encapsulate video support with compilation variable EXV_ENABLE_VIDEO: fix PR windows matrix

* Encapsulate video support with compilation variable EXV_ENABLE_VIDEO: activate only for concerned CI tests

* Encapsulate video support with compilation variable EXV_ENABLE_VIDEO: desable for linux release

* Encapsulate video support with compilation variable EXV_ENABLE_VIDEO: add to Fuzz PR
2023-01-04 13:01:34 +01:00
Kevin Backhouse
346e11493f
Merge pull request #2443 from kevinbackhouse/inih-from-library3
Remove libinih from codebase and add it as a dependency instead
2023-01-04 10:44:47 +00:00
Rosen Penev
bb311ba728 clang-tidy on Windows
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-01-04 01:40:27 -08:00
Rosen Penev
f981c51eea get rid of -fanalyzer memory leaks
Don't use make_shared inside a function. Instead, change constructor to
value to have std::move.

Also move shared_ptrs everywhere. It's fairly expensive to copy.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-01-03 01:24:04 -08:00
Rosen Penev
d458bf2540 clang-tidy: apply to newly merged stuff
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-01-03 01:24:04 -08:00
Mohamed Ali Chebbi
7fac35e19a
1748 Video Support in V1.0: part 3/3 : support Asfvideo (#2416)
* 1748 Video Support in V1.0: part 3/3 : support AsfVideo

* 1748 Video Support in V1.0: part 3/3 : support AsfVideo : fix Mac Os error compile

* 1748 Video Support in V1.0: part 3/3 : support AsfVideo : delete unuseful warnings

* code review and clean up some code
2022-12-31 18:20:31 +01:00
Rosen Penev
f145fae33b replace any_of with find
Removes need for lambda.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-12-31 02:12:17 -08:00
Rosen Penev
304b13c271 use find instead of std::find_if
There's already an operator==

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-12-31 02:12:17 -08:00
Rosen Penev
ff0491a102 clang-tidy: use make_unique
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-12-31 02:12:17 -08:00
Rosen Penev
ce8920a0ea clang-tidy: various fixes
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-12-31 02:12:17 -08:00
Mohamed Ali Chebbi
d755fc18b5
1748 Video Support in V1.0: part 2/3 : support Riffvideo (#2415)
* 1748 Video Support in V1.0: part 2/3 : support RiffVideo

* limit the buffer_size

* Update exiv2.md

Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>

* Code Review and cleanUp code

* Update riffvideo.hpp

Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
2022-12-31 10:45:45 +01:00
Mohamed Ali Chebbi
1280f3b849
1748 Video Support in V1.0: part 1/3 : support MatroskaViedo (#2413)
* 1748 Video Support in V1.0: part 1/3 : support MatroskaViedo

* Simplify the code of matroskavideo

* protect conevrtuint64 method from overflow

* use size_t instead of uint64_t
2022-12-30 15:58:07 +01:00
norbertwg
9ca161d1e5
Rename resp. remove duplicate exif keys (#2434)
* rename resp. remove duplicate Exif keys

Duplicate key names with different tag are renamed
Following most of the existing entries, the key with higher tag number
is renamed to ...2.
Exceptions: Canon.CustomFunctions,Olympus.ImageHeight,Olympus.ImageWidth
In the available images samples only the key with higher tag number is
used, so changing the other has less impact on test data and also on
users.
Canon.WhiteBalanceTable with tag 0x00a4 was listed twice, once with
description "SharpnessTable". The entry with the deviating description
is deleted.

* clang format

* adjust test output files (after merge with Exiv2)

* add Exif.NikonLd4.FocusDistance to EasyAccess API

* clang format
2022-12-30 14:37:05 +01:00
Kevin Backhouse
ba258cb1ae
cmake fatal error if inih library is not found. 2022-12-29 13:04:07 -06:00
Kevin Backhouse
a4164ce866
Remove libinih from codebase and add it as a dependency instead. 2022-12-28 09:33:08 -06:00
norbertwg
8d8ac99be0 Lens Recognition HD PENTAX-DA* 11-18mm F2.8 ED DC AW 2022-12-27 17:53:20 +01:00
Miloš Komarčević
b52ade814b Prefer writing PNG eXIf chunk 2022-12-26 12:34:20 +01:00
Kevin Backhouse
2739d90073
Credit to OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=52767
Add wrapper class to automatically call BrotliDecoderDestroyInstance() on exit.
2022-11-27 15:36:00 +00:00
Kevin Backhouse
9d044d30b1
Use Safe::add 2022-11-23 12:37:09 +00:00