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
Kevin Backhouse
e831219d5c
Correct error from #2301
2022-08-03 20:00:20 -07:00
Rosen Penev
e74feff4d8
strcmp to == conversions
...
Does the same thing.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-08-03 01:36:19 -07:00
Kevin Backhouse
ee5dae4ddd
Fix implicit cast warning.
2022-08-01 16:28:36 -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
Kevin Backhouse
8ba9003f19
Fix clang-tidy warning about double move.
2022-07-31 16:00:17 -07:00
Kevin Backhouse
39239cef68
Merge pull request #2296 from kevinbackhouse/tiff-offset-size_t
...
Use size_t for the offset argument in TiffComponent
2022-07-30 17:23:57 +01:00
Kevin Backhouse
89040ad1de
Fix implicit type conversions.
2022-07-28 22:46:17 -04:00
Kevin Backhouse
d8bd05f4e8
Use size_t
2022-07-27 22:54:41 -04:00
Kevin Backhouse
30debd2635
Use size_t for the offset.
2022-07-27 17:26:18 -04:00
Rosen Penev
b793409eb6
find_if and lambda conversions
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-07-24 16:34:00 -07:00
Kevin Backhouse
3ef783e02a
Convert IfdId and SectionId to enum classes.
2022-07-11 22:37:52 +01:00
Rosen Penev
bae7da19ca
clang-tidy: use default member init
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-07-03 12:24:41 -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
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
65c5b772c9
fix misplaced const
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-04-18 14:23:58 -07:00
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>
2022-04-18 13:53:13 -07: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
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
fdfcde5e4b
structured binding conversions
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-04-09 10:49:02 +02:00
Rosen Penev
b72e4b0e44
clang-tidy: use auto
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-04-01 16:37:51 -07:00
Luis Díaz Más
d7f35e33f0
Remove useless static_casts
2022-03-25 08:43:37 +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 Diaz
4355d635d4
More conversions to size_t while removing static_casts
2022-03-14 11:55:10 +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
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
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
Luis Díaz Más
5508e6f466
hexdump to size_t
2022-03-07 22:25:51 +01:00
Luis Díaz Más
8b1fe379a1
Removing unused headers thanks to IWYU
2022-03-07 22:25:47 +01:00
Rosen Penev
daf7c890e2
misc stuff
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-03-06 01:17:12 -08:00
Rosen Penev
6d1fa2ecea
clang-tidy: use empty() instead of size()
...
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
Rosen Penev
04bacdedd6
clang-tidy: use auto
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-03-04 15:54:05 -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
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
5d627433fc
Remove useless DataBuf::clear()
2022-02-27 09:36:46 +01: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
0f03e77634
Simplify code around UniquePtr(s) & use make_unique over new
2022-02-05 11:02:04 +01:00
Kevin Backhouse
b6a4fd1c67
Add storage parameter to setData.
2021-12-24 12:54:35 +00:00
Kevin Backhouse
9f3240c91c
Delete TiffEntryBase::isMalloced_ field and use a std::shared_ptr instead.
2021-12-24 12:32:48 +00:00
Kevin Backhouse
9ff72e5ca5
Make offset=0 the default parameter.
2021-08-30 12:41:08 +01:00
Kevin Backhouse
c9d0cf3643
Make fields of DataBuf private.
2021-08-29 15:43:10 +01:00
Rosen Penev
f3fcffd6e6
remove most usages of std::make_pair
...
Better alternatives exist with C++11.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-08-17 19:11:28 -07:00
Kevin Backhouse
a1b65a7928
Merge pull request #1849 from Exiv2/mergify/bp/main/pr-1848
...
Replace assertion with an error message (backport #1848 )
2021-08-06 13:47:11 +01:00