Commit Graph

406 Commits

Author SHA1 Message Date
Rosen Penev
b10f2d3e95 geotag: fix compilation with MSYS
using namespace std interferes with windows.h

stat defines interfere with internal headers.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-04-04 06:54:09 -07:00
Rosen Penev
0c0dabfcc7 geotag: add GCC7 support
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-03-25 08:04:14 -07:00
Rosen Penev
8fe2ae6030 remove constexpr
const_iterator is not constexpr. clang 15 on MSYS2 fails to compile
because of this.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-03-23 13:29:21 -07:00
Rosen Penev
024e026bbb clang: small fixes
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-03-22 06:11:10 -07: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
Kevin Backhouse
43c9ec0f50
Add EXIV2_ENABLE_INIH flag to enable building without libinih. 2023-01-16 10:33:25 +00: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
d458bf2540 clang-tidy: apply to newly merged stuff
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-01-03 01:24:04 -08:00
Kevin Backhouse
a4164ce866
Remove libinih from codebase and add it as a dependency instead. 2022-12-28 09:33:08 -06:00
norbertwg
3c87d82cd0 fix for GCC compiler error, test reference file 2022-10-09 15:55:58 +02:00
norbertwg
e38d3d9976 several keys added to easyaccess
sample easyaccess-test enhanced with additional optional arguments
"category" for easier definition of some tests
2022-10-07 18:25:25 +02:00
Peter
9dc34ad39c
Update Sony(1|2) tags (#2323)
* Update Sony(1|2) group (minor Minolta changes)

Transcribe all tags (except for `LensID`) from main ExifTool Sony
group into Exiv2.
Changes include:
- Rename `ColorReproduction` -> `CreativeStyle` and
  `LongExposureNoiseReduction` -> `FocusMode3` to reflect use.
- Rename `0x*` tagnames to equivalent ExifTool tags (e.g.,
  `0x2006` -> `Sharpness`).
- Remove tag entries that are Groups (e.g., `ShotInfo`).
- Separate some common Sony/Minolta data as the camera types use
  different values (e.g., `Quality`)
- Additional `exiv2-Sony*.exv` test files come from ExifTool Sony
  samples (https://exiftool.org/Sony.tar.gz).

ExifTool Sony tags sources:
https://www.exiftool.org/TagNames/Sony.html
1e17485cbb/lib/Image/ExifTool/Sony.pm

* Improve coverage of `Sony(1|2)` group

* Fix clang compilation on macOS

* Fix github-code-scanning warnings

* Fix minor `Exif.Sony(1|2)` problems

* Fix tests and update `Sony(1|2)` group coverage

* Fix testing

* Minor fixes and regenerate Regression data

* Update Sony tags with `getModel()`

Make finding the Sony model more resilient by also using
`SonyModelID`.

* Fix `Exif.Sony(1|2).AFPointsUsed` type

* Improve `Exif.Sony(1|2).*` coverage

* Fix types in Sony func `getFocusMode()`

* Update Regression tests for `Sony(1|2)`

* Minor fixes to `Sony(1|2)` tags

* Update `Sony(1|2)` tag coverage

* Improve `Sony(1|2)` tag coverage

* Update easyaccess with `Exif.Sony(1|2)` tags

* Update `SonyModelID` array comment

* Add Sony `LensSpec` tag to easyaccess

* Update `Sony(1|2)` label/descriptions

* Update `int` to `size_t` (credit:@kevinbackhouse)

* Fix Windows build warning in `src/tags_int.hpp`
2022-09-27 09:26:26 +01:00
Rosen Penev
2fa84f4bab remove using
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-08-21 14:37:18 -07:00
Rosen Penev
b6c2062fae std::to_string conversions
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-08-17 02:25:10 -07:00
Rosen Penev
fc840405cc revert std::function back to function pointers
The former has too much overhead. No point in it.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-08-08 19:24:47 -07:00
Rosen Penev
5c90684441 simplify some defines
As far as I can tell, _WIN32 is defined for true Windows platforms.
Cygwin is a POSIX platform.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-08-08 15:31:05 -07:00
Rosen Penev
cf963e9e4d clang-tidy: C casts to C++
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-05-21 17:58:10 -07:00
Rosen Penev
b4c90b5e16 clang-tidy: replace pointer magic with data()
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-05-21 17:14:58 -07:00
Luis Díaz Más
c9bdd6ed94
Merge pull request #2209 from Exiv2/mainTODOs
Improvements around TODO comments
2022-04-29 09:04:46 +02:00
Rosen Penev
a86bc386da reference conversions
There's no nullptr here.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-04-18 13:53:14 -07:00
Rosen Penev
2e721a716e std::function conversions
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-04-18 13:02:32 -07:00
Rosen Penev
d466c1e9eb
minor clang-tidy fixes (#2213)
* clang-tidy: add const to member function

Signed-off-by: Rosen Penev <rosenp@gmail.com>

* clang-tidy: remove duplicate access specifier

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-04-16 11:29:15 +02:00
Luis Díaz Más
c3d0100d48 Fixing bad usages of DataBuf (when it is empty) 2022-04-14 10:40:58 +02:00
Rosen Penev
7a826ac529 clang-tidy: add parentheses to macros
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-04-09 12:19:38 -07:00
Rosen Penev
8810b0b630 clang-tidy: no else after return
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-04-01 16:38:04 -07:00
Rosen Penev
9f67620503 clang-tidy: add more nodiscard
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-04-01 16:38:03 -07:00
Luis Díaz Más
c6340caca7 Remove exiv2json sample and tests depending on it 2022-04-01 09:07:08 +02:00
Luis Díaz Más
3b9fcb4b3d Update .clang-format to align pointers to the types 2022-04-01 07:55:07 +02:00
Rosen Penev
c4eedd6ae4 nodiscard addition
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-03-29 20:58:11 -07:00
Rosen Penev
389501462a delete
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-03-29 20:54:12 -07:00
Rosen Penev
043547cbd0 remove various usages of memset
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-03-27 01:47:02 -07:00
Luis Díaz Más
ae4df71233 Remove DataBuf::copyBytes and use std::copy instead 2022-03-23 17:17:29 +01:00
Luis Díaz Más
c5c315b6e7 Usage of EXIT_SUCCESS/FAILURE instead of hard-coded values 2022-03-23 16:55:18 +01:00
Luis Díaz Más
b05573fadc Remove most of the asserts from codebase 2022-03-23 16:55:18 +01:00
Luis Díaz Más
30bf563f4d Update .clang-format file & apply clang-format to whole project 2022-03-16 22:30:53 +01:00
Luis Díaz Más
c0aadda37e Remove dead sample apps 2022-03-16 22:14:37 +01:00
Luis Diaz
bc7f08b3c4 Remove obsolete werror sample 2022-03-12 16:58:41 +01:00
Luis Díaz Más
7119b7676f remove templating & simplify error message
+ clang-format in Error files
+ Remove AnyError
2022-03-12 16:58:41 +01:00
Luis Díaz Más
96f7f2e4c5 Convert Exiv2::ErrorCode into an enum class 2022-03-12 16:58:40 +01:00
Luis Díaz Más
c115d4daf7
Merge pull request #2131 from Exiv2/mainCleanups
Include what you use + more SPDX identifiers + few other cleanups
2022-03-11 21:02:45 +01:00
Rosen Penev
8dadcdf72a manual nullptr removals
unique_ptr has a bool overload. It's also easier to reason about.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-03-09 17:12:29 -08:00
Luis Díaz Más
f894ee0568 Fix debug builds 2022-03-08 10:13:22 +01:00
Luis Díaz Más
c0a3242e73 C++-style headers 2022-03-08 10:05:27 +01:00
Rosen Penev
b6bdbf5574 clang-tidy: don't use else after return/throw
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-03-07 14:42:33 -08:00
Luis Díaz Más
bbc99ae581 Use auto for unique pointers 2022-03-07 22:25:51 +01:00
Luis Díaz Más
5a6ec65315 Use SPDX identifiers in more files 2022-03-07 22:25:51 +01:00
Luis Díaz Más
b3a216310a Removing unused headers thanks to IWYU 2022-03-07 22:25:51 +01:00
Luis Díaz Más
2834fa5f05 Use [[maybe_unused]] 2022-03-07 22:25:51 +01:00