Kevin Backhouse
5d11208aa0
Minor refactorings to stop UBSAN from complaining.
2 years ago
Rosen Penev
b9d94e61fe
coverity: remove dead code
...
Found with: CID 1521533
Unsigned compared against 0 (NO_EFFECT)
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev
e7977554e2
default initializations
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev
0d353ac5f3
work around windows.h min/max macros
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
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>
2 years ago
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>
2 years ago
Kevin Backhouse
abd817d181
Use size_t for sizes and offsets.
3 years ago
Rosen Penev
84f566b4b7
use reference to work around MSVC bug
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Kevin Backhouse
e831219d5c
Correct error from #2301
3 years ago
Rosen Penev
e74feff4d8
strcmp to == conversions
...
Does the same thing.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Kevin Backhouse
ee5dae4ddd
Fix implicit cast warning.
3 years ago
Rosen Penev
1d0530f04d
misc sonarlint changes
...
Mostly const changes.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Kevin Backhouse
8ba9003f19
Fix clang-tidy warning about double move.
3 years ago
Kevin Backhouse
39239cef68
Merge pull request #2296 from kevinbackhouse/tiff-offset-size_t
...
Use size_t for the offset argument in TiffComponent
3 years ago
Kevin Backhouse
89040ad1de
Fix implicit type conversions.
3 years ago
Kevin Backhouse
d8bd05f4e8
Use size_t
3 years ago
Kevin Backhouse
30debd2635
Use size_t for the offset.
3 years ago
Rosen Penev
b793409eb6
find_if and lambda conversions
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Kevin Backhouse
3ef783e02a
Convert IfdId and SectionId to enum classes.
3 years ago
Rosen Penev
bae7da19ca
clang-tidy: use default member init
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
cf963e9e4d
clang-tidy: C casts to C++
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Luis Díaz Más
c9bdd6ed94
Merge pull request #2209 from Exiv2/mainTODOs
...
Improvements around TODO comments
3 years ago
Rosen Penev
65c5b772c9
fix misplaced const
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
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
Luis Díaz Más
c3d0100d48
Fixing bad usages of DataBuf (when it is empty)
3 years ago
Rosen Penev
0d971e98e4
remove some unique_ptrs
...
They're not really used as pointers.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
fdfcde5e4b
structured binding conversions
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
b72e4b0e44
clang-tidy: use auto
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Luis Díaz Más
d7f35e33f0
Remove useless static_casts
3 years ago
Luis Díaz Más
b05573fadc
Remove most of the asserts from codebase
3 years ago
Luis Díaz Más
30bf563f4d
Update .clang-format file & apply clang-format to whole project
3 years ago
Luis Diaz
4355d635d4
More conversions to size_t while removing static_casts
3 years ago
Luis Diaz
7576a2757b
More size_t for sizes
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
Rosen Penev
c2bcd4b08e
replace EXV_COUNTOF with std::size
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Luis Díaz Más
5508e6f466
hexdump to size_t
3 years ago
Luis Díaz Más
8b1fe379a1
Removing unused headers thanks to IWYU
3 years ago
Rosen Penev
daf7c890e2
misc stuff
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
6d1fa2ecea
clang-tidy: use empty() instead of size()
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
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>
3 years ago
Rosen Penev
04bacdedd6
clang-tidy: use auto
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
a5c094b85f
clang-tidy: use concat namespaces
...
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
5d627433fc
Remove useless DataBuf::clear()
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