Commit Graph

106 Commits

Author SHA1 Message Date
Miloš Komarčević
0db191257d Support for parsing DCP files 2023-04-10 15:34:49 -07:00
Rosen Penev
0aed79ff57 remove several constructors
Just direct initialize

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-03-22 06:11:10 -07:00
Rosen Penev
22b12012a6 more SonarLint cleanups
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-03-20 08:01:22 -07:00
Rosen Penev
d29001f2a4 clang-tidy: don't use non const refs
Found with: google-runtime-references

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-03-20 08:01:22 -07:00
Rosen Penev
2fd523873b remove MSVC hacks
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-03-20 08:01:22 -07:00
Rosen Penev
725875497b SonarLint cleanups 2023-03-03 19:35:42 -08:00
Rosen Penev
3fe6d78014 Remove some constructors
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-02-25 15:46:42 -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
Kevin Backhouse
abd817d181 Use size_t for sizes and offsets. 2022-10-31 03:00:47 -07:00
Rosen Penev
84f566b4b7 use reference to work around MSVC bug
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-09-25 14:50:53 -07:00
Peter
ccebe7936e
Update Nikon flash tags (#2274) 2022-08-28 10:02:18 +01: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
Kevin Backhouse
2e8ce712ec Use emplace(). 2022-08-04 11:07:18 -07:00
Kevin Backhouse
166b5b834d Replace TiffTreeStruct with std::pair 2022-08-04 11:07:18 -07:00
Kevin Backhouse
67270c2b11 Use std::unordered_map for TiffTreeStruct lookup. 2022-08-04 11:07:18 -07:00
Kevin Backhouse
be1c00c916 Suggestions from @neheb and @piponazo 2022-08-04 11:05:35 -07:00
Kevin Backhouse
71dfff5a69 Use a switch 2022-08-04 11:05:35 -07:00
Kevin Backhouse
7ec15d247e Use std::unordered_set for tiffImageTags 2022-08-04 11:05:35 -07:00
Rosen Penev
12b94bc420 get rid of extern const
Looks like some pre C++11 thing.

Also fix formatting of these by adding , at the end of the arrays.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-08-03 20:00:33 -07:00
Kevin Backhouse
1fccceeba1 Use std::map for faster lookup. 2022-08-03 01:36:55 -07:00
Rosen Penev
d5e42da39e replace structs with std::pair
Simpler.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-08-03 01:35:59 -07:00
Rosen Penev
1d0530f04d misc sonarlint changes
Mostly const changes.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-07-31 20:51:12 -07:00
Rosen Penev
3ae1d3b48e return make_unique directly
Simpler

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-07-24 23:00:02 -07:00
Kevin Backhouse
3ef783e02a
Convert IfdId and SectionId to enum classes. 2022-07-11 22:37:52 +01: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
2e721a716e std::function conversions
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-04-18 13:02:32 -07:00
Rosen Penev
0d971e98e4 remove some unique_ptrs
They're not really used as pointers.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-04-10 01:40:34 -07: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
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
Rosen Penev
b2b6d834ba
some std::array conversions (#2148)
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-03-15 10:17:06 +01:00
Luis Diaz
7576a2757b More size_t for sizes 2022-03-14 11:50:42 +01:00
Luis Diaz
62aad98d0b Change Metadatum::copy return value from long to size_t 2022-03-14 11:47:15 +01:00
Luis Díaz Más
96f7f2e4c5 Convert Exiv2::ErrorCode into an enum class 2022-03-12 16:58:40 +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
Rosen Penev
c2bcd4b08e replace EXV_COUNTOF with std::size
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-03-08 00:26:33 -08:00
Rosen Penev
133849c394 clang-tidy: remove pointless get()
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-03-05 16:21:26 -08:00
Rosen Penev
a5c094b85f clang-tidy: use concat namespaces
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-03-04 15:54:05 -08:00
Luis Díaz Más
b17828b454
Use SPDX for licenses (#2122)
* Use SPDX identifier in header files

* Use SPDX identifier in rest of source files

* Fix usage of SPDX for files with 2 licenses

* Add global license file

* Fix compilation
2022-03-04 11:44:39 +01:00
Luis Díaz Más
5ca423d292
Merge pull request #2118 from Exiv2/main_NewDelete
Refactoring & Cleanup (Moving to size_t usage & less naked new/deletes)
2022-03-04 08:23:46 +01:00
Luis Díaz Más
a5b6db171c
Merge pull request #1919 from dimin/viqi
fix for reading jpeg-xr images
2022-02-28 09:42:43 +01:00
Luis Díaz Más
b9f9d041ea Several transformations on DataBuf + migration to size_t
- Provide begin/end iterators to DataBuf and simplify code
- Adapt test output after last changes
- Replacing long by size_t in value.hpp
- Use size_t in some Photoshop functions
- Remove some static_casts
2022-02-27 09:41:47 +01:00
Luis Díaz Más
aec36f86d7 Replace naked new operators 2022-02-27 09:36:46 +01:00
Robin Mills
9bf4967e5c
Merge pull request #2110 from mallman/nikon_ContrastDetectAFInFocus
Make Nikon ContrastDetectAFInFocus tags Bytes that print as "Yes" or "No"
2022-02-26 17:44:05 +00:00
Michael Allman
a3e2410b88 Print value of ContrastDetectAFInFocus as Yes/No. Change internal
selection logic for NikonAf2* from tag data length to group version
2022-02-19 15:47:02 -08:00
Luis Díaz Más
21eb0cec4f Fix build when EXIV2_BUILD_MESSAGES is ON 2022-02-19 19:05:27 +01:00
Michael Allman
9541a89b13 Make Exif.NikonAf2.ContrastDetectAFInFocus and
Exif.NikonAf22.ContrastDetectAFInFocus byte types
2022-02-18 15:52:53 -08:00
Christoph Hasse
0aa34c3098 fix(canon): cleanup canonAf2 and canonAf3 related code 2022-02-14 16:30:00 +01:00
Robin Mills
800ed8959f Rewire Canon MakerNote 0x0026 (AFInfo) to allow TiffDecoder::decodeCanonAFInfo to handle this tag.
Minor changes to test script.
Cosmetic code changes.
2022-02-14 16:30:00 +01:00
Alex Esseling
b70a3fb572 Canon AF Info 2 Tag 2022-02-14 16:29:45 +01:00