Rosen Penev
a10c08ba1d
swap variables
...
These are the wrong way around. MSVC warns with /W4.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-02-11 10:44:20 -08:00
Rosen Penev
5e20467e5c
default init static variable
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-08-05 01:01:25 -07:00
Rosen Penev
7b9ba51c4e
enum class conversion
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-08-05 01:01:25 -07:00
Rosen Penev
6e3db99755
simplify switch statement with returns
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-08-05 01:01:25 -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
Rosen Penev
932d59a984
find_if conversion
...
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
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
262d0ee4b3
struct to std::pair conversions
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-04-01 18:21:19 -07:00
Rosen Penev
b72e4b0e44
clang-tidy: use auto
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-04-01 16:37:51 -07:00
Rosen Penev
043547cbd0
remove various usages of memset
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-03-27 01:47:02 -07:00
Rosen Penev
9dc35e7380
find to std::find
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-03-26 14:32:22 -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
ae4df71233
Remove DataBuf::copyBytes and use std::copy instead
2022-03-23 17:17:29 +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
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 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
2834fa5f05
Use [[maybe_unused]]
2022-03-07 22:25:51 +01:00
Rosen Penev
63e41c3aeb
clang-tidy: simplify bool
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-03-05 16:21:26 -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
04bacdedd6
clang-tidy: use auto
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-03-04 15:54:05 -08:00
Rosen Penev
962e3b7369
clang-tidy: use default
...
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
Luis Díaz Más
aec36f86d7
Replace naked new operators
2022-02-27 09:36:46 +01:00
Luis Díaz Más
c5a9dfd9af
Merge pull request #2109 from Exiv2/main_StringView
...
Refactoring & cleanup
2022-02-21 22:29:43 +01:00
Luis Díaz Más
21eb0cec4f
Fix build when EXIV2_BUILD_MESSAGES is ON
2022-02-19 19:05:27 +01:00
Luis Díaz Más
76f01fd4d3
Clean more header inclusions
2022-02-18 22:48:01 +01:00
Luis Díaz Más
59f4d0de27
cppcheck: reduce scope of variables
2022-02-18 18:01:02 +01:00
Luis Díaz Más
ea201ce613
Remove dead code
2022-02-18 18:01:02 +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
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
Kevin Backhouse
81cfc162c1
Use std::move to transfer ownership of DataBufs.
2021-10-10 23:56:00 +01:00
Kevin Backhouse
5fdd9da3d3
Use =default.
2021-10-09 21:39:15 +01:00
Kevin Backhouse
482cb2ded5
Clarify ownership model of CiffComponent::pData_
2021-09-26 15:52:58 +01:00
Kevin Backhouse
e71b99b236
Merge pull request #1886 from kevinbackhouse/private-pData
...
Make fields of DataBuf private
2021-09-09 22:21:02 +01:00
Kevin Backhouse
bd211a90ac
Credit to OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=37889
...
Avoid reading 1 byte off the end when the string does not contain a '\0' byte.
2021-09-02 10:26:08 +01: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
Kevin Backhouse
ad5e6c479c
Extra checking to prevent the loop counter from wrapping around.
2021-07-18 14:53:07 +01:00
Kevin Backhouse
fa52d7e2cb
Better way to print the error message.
2021-07-15 19:25:37 +02:00