Rosen Penev
b8855fb3b5
misc sonarlint cleanups
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Kevin Backhouse
b0040e3bbe
Convert type of depth parameter to size_t.
3 years ago
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
3 years ago
Rosen Penev
48f848f5bb
clang-tidy: remove const params in decls
...
Found with readability-avoid-const-params-in-decls
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
bad4712df8
static constexpr conversions
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Luis Díaz Más
30bf563f4d
Update .clang-format file & apply clang-format to whole project
3 years ago
Luis Díaz Más
573c3c79fc
Merge pull request #2145 from Exiv2/mainSizeT_n
...
More migration to size_t
3 years ago
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.
3 years ago
Luis Diaz
7576a2757b
More size_t for sizes
3 years ago
Luis Diaz
137ea080b5
Change Metadatum::size() return value from long to size_t
3 years ago
Luis Diaz
62aad98d0b
Change Metadatum::copy return value from long to size_t
3 years ago
Luis Díaz Más
96f7f2e4c5
Convert Exiv2::ErrorCode into an enum class
3 years ago
Luis Díaz Más
c115d4daf7
Merge pull request #2131 from Exiv2/mainCleanups
...
Include what you use + more SPDX identifiers + few other cleanups
3 years ago
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>
3 years ago
Luis Díaz Más
f894ee0568
Fix debug builds
3 years ago
Luis Díaz Más
8b1fe379a1
Removing unused headers thanks to IWYU
3 years ago
Rosen Penev
887b08b0b7
clang-tidy: range loop conversion
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
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
3 years ago
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
3 years ago
Luis Díaz Más
615ccff5ab
Fix another case revealed by tests
3 years ago
Luis Díaz Más
c5a9dfd9af
Merge pull request #2109 from Exiv2/main_StringView
...
Refactoring & cleanup
3 years ago
Luis Díaz Más
ea201ce613
Remove dead code
3 years ago
Kevin Backhouse
256365830a
Replace Metadatum::toLong() with Metadatum::toInt64().
3 years ago
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.
3 years ago
Luis Díaz Más
0f03e77634
Simplify code around UniquePtr(s) & use make_unique over new
3 years ago
Luis Díaz Más
9d8dd86945
Use auto to reduce verbosity around code dealing with iterators
3 years ago
Kevin Backhouse
9ff72e5ca5
Make offset=0 the default parameter.
4 years ago
Kevin Backhouse
c9d0cf3643
Make fields of DataBuf private.
4 years ago
Rosen Penev
e7eddfc2f5
use more emplace_back
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Kevin Backhouse
eb2782e685
Fix warning: comparison of integer expressions of different signedness
4 years ago
Kevin Backhouse
670dfb2fab
Better fix for potential integer overflow in `bytes.size() - 3`.
4 years ago
Kevin Backhouse
69d82ffe01
Defensive coding changes to avoid integer overflow in loop conditions.
4 years ago
Kevin Backhouse
bf786f4cc6
Updates to make fuzzing work.
4 years ago
Kevin Backhouse
c2b52119d4
Check that findKey didn't return end().
4 years ago
Kevin Backhouse
b16cd52b88
Replace sprintf with snprintf.
4 years ago
Rosen Penev
2c57f214c5
clang-tidy: use nullptr
...
Found with modernize-use-nullptr
Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev
b8712188bb
clang-tidy: use auto
...
Found with modernize-use-auto
Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev
1b9b77c51f
clang-tidy: add ending namespace comments
...
Found with google-readability-namespace-comments
Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev
2e73aa9dc0
default con/destructors in headers
...
Helps to optimize trivially destructable stuff.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev
8128716287
clang-tidy: use = default
...
Found with modernize-use-equals-default
Ran through git clang-format
Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev
4ceb325c8f
clang-tidy: range for loop conversions
...
Found with modernize-loop-convert
Ran through git clang-format.
Also removed several questionable loops and replaced with simpler
algorithms.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Luis Díaz Más
0bbaa6eff3
cpp: Replace auto_ptr by unique_ptr
4 years ago
Robin Mills
d632988bbd
Massive code prolog cleanup.
4 years ago
Luis Díaz Más
113136e134
Replace DEBUG with EXIV2_DEBUG_MESSAGES
...
Fixes #926
6 years ago
Kevin Backhouse
9092b422e6
Prevent out-of-bounds read. ( #868 )
6 years ago
Luis Diaz Mas
6f8d8e3da6
cleanup header inclusions in API
7 years ago
Dan Čermák
962962a8e9
Port Iptc::printStructure & getUshort to slices API
...
This fixes #211 , #210 , #209
7 years ago
Dan Čermák
fec6535ae8
[binaryToString] Reimplement using Slices
...
- reimplement binaryToString:
- it now accepts a Slice and nothing else
- it does not return a std::string but instead a proxy object that implements
operator<< (this should be more efficient, as we do not need to touch the
heap in most cases)
- addapt unit tests
- replace all occurences with the new API
7 years ago
Luis Díaz Más
603692a1d8
Copyright to Exiv2 authors
7 years ago
Dan Čermák
67dc3e691f
[IptcData::printStructure] clang-format function
7 years ago