Rosen Penev
67df85135d
early exit
...
less indentation
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-11-20 20:00:15 -08:00
Rosen Penev
28d1880176
replace find/rfind with startsWith
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-10-28 11:05:23 -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
1d0530f04d
misc sonarlint changes
...
Mostly const changes.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-07-31 20:51:12 -07:00
Peter
dc4ae73013
Add tag description option to exiv2 app ( #2279 )
...
* Add `tagDesc()` to (Exif|Xmp|Iptc) Datums and Keys
* Add `--Print d` option to exiv2 app
* Add testing for all exiv2 application `--Print` options
* Update manpage
2022-07-12 15:31:43 +01:00
Rosen Penev
fc1a398488
clang-tidy: remove const
...
It doesn't do what it's supposed to here.
Found with misc-misplaced-const
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-07-05 17:41:12 -07:00
Rosen Penev
ae66ecec0d
clang-tidy: use nullptr
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-04-10 01:40:39 -07:00
Rosen Penev
fdfcde5e4b
structured binding conversions
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-04-09 10:49:02 +02:00
Rosen Penev
aa41d557b2
function move
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-04-01 16:38:04 -07: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
573c3c79fc
Merge pull request #2145 from Exiv2/mainSizeT_n
...
More migration to size_t
2022-03-14 21:42:43 +01:00
Jim Easterbrook
04ae6c2c4c
Add key name to "Value not set" error message ( #2149 )
...
The error typically occurs when writeMetadata() is called. It's easier
to find the problem if you know which datum hasn't had a value set.
2022-03-14 13:17:54 +01:00
Luis Diaz
7576a2757b
More size_t for sizes
2022-03-14 11:50:42 +01:00
Luis Diaz
137ea080b5
Change Metadatum::size() return value from long to size_t
2022-03-14 11:47:15 +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
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
Luis Díaz Más
a009ac1f61
Merge pull request #2135 from neheb/1
...
manual nullptr removals
2022-03-10 17:29:09 +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
Miloš Komarčević
eb49d66caf
Strip XMP raw packet before decoding
2022-03-09 17:43:20 +01:00
Luis Díaz Más
f894ee0568
Fix debug builds
2022-03-08 10:13:22 +01:00
Rosen Penev
61a5d8594c
remove some new
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-03-08 00:15:07 -08:00
Luis Díaz Más
b3a216310a
Removing unused headers thanks to IWYU
2022-03-07 22:25:51 +01:00
Rosen Penev
f0d23eca9b
clang-tidy: add some missing operators
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-03-06 01:17:12 -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
5833101b9b
manual nullptr conversions
...
Mostly not caught because I'm not running clang-tidy on Windows.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-03-05 16:21:25 -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
208ec70df8
Fix windows builds
2022-02-27 13:48:21 +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
Kevin Backhouse
256365830a
Replace Metadatum::toLong() with Metadatum::toInt64().
2022-02-18 12:30:33 +00:00
Kevin Backhouse
2a3dd2def9
Replace Value::toLong with Value::toInt64. ( #2062 )
...
* Replace Value::toLong with Value::toInt64.
* Fix compiler warning.
* Fix compile error.
* Fix declaration of canonEv
* Fix compiler warning.
* Fix compiler warning.
* Use int64_t for offsets in tiffcomposite_int.cpp
* Fix compiler warning.
* Fix compiler warnings.
* Fix compiler warning.
* Fix compiler warning.
* Fix compiler warning.
* Fix compiler warning.
* Remove static_cast<long int> in TagDetails initializer.
2022-02-12 21:16:18 +00:00
Luis Díaz Más
b67dee8a57
Fix build on linux
2022-02-05 11:02:04 +01:00
Luis Díaz Más
0f03e77634
Simplify code around UniquePtr(s) & use make_unique over new
2022-02-05 11:02:04 +01:00
Luis Díaz Más
9d8dd86945
Use auto to reduce verbosity around code dealing with iterators
2022-02-05 11:02:03 +01:00
mergify[bot]
2d80891837
Only include expat.h when XMP is enabled. ( #1973 )
...
(cherry picked from commit 03cc59122249e79c5a72982b25dad88f4c2803d6)
Co-authored-by: Kevin Backhouse <kevinbackhouse@github.com>
2021-10-20 10:21:52 +02:00
Kevin Backhouse
ce02361a64
Only build XMLValidator when XMP is enabled.
2021-08-27 17:03:35 +01:00
Kevin Backhouse
b35cc5ffa6
Credit to OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=37363
...
Do some basic XML validation before running the xmpsdk library to avoid bugs in xmpsdk.
2021-08-21 12:42:24 +01:00
Kevin Backhouse
944e68fa15
Merge pull request #1787 from Exiv2/mergify/bp/main/pr-1766
...
Extra checking to prevent loop counter from wrapping around (backport #1766 )
2021-07-25 19:53:52 +01:00
Kevin Backhouse
69d82ffe01
Defensive coding changes to avoid integer overflow in loop conditions.
2021-07-18 15:02:35 +01:00
Kevin Backhouse
dc2c77ce81
Safer std::vector indexing.
2021-07-18 14:40:45 +01:00
Kevin Backhouse
c2b52119d4
Check that findKey didn't return end().
2021-07-05 22:26:09 +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
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
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
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
1b9b77c51f
clang-tidy: add ending namespace comments
...
Found with google-readability-namespace-comments
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-14 17:34:09 +02:00
Rosen Penev
bf290e84e5
fix compilation with EXIV2_DEBUG_MESSAGES
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-14 17:23:10 +02:00
Rosen Penev
9642e3cceb
clang-tidy: remove pointless string init
...
Found with readability-redundant-string-init
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-12 07:12:15 +02:00