Rosen Penev
5e20467e5c
default init static variable
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
7b9ba51c4e
enum class conversion
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
6e3db99755
simplify switch statement with returns
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
1d0530f04d
misc sonarlint changes
...
Mostly const changes.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
3ae1d3b48e
return make_unique directly
...
Simpler
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
932d59a984
find_if conversion
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Kevin Backhouse
3ef783e02a
Convert IfdId and SectionId to enum classes.
3 years ago
Luis Díaz Más
c3d0100d48
Fixing bad usages of DataBuf (when it is empty)
3 years ago
Rosen Penev
262d0ee4b3
struct to std::pair 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
Rosen Penev
043547cbd0
remove various usages of memset
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
9dc35e7380
find to std::find
...
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
ae4df71233
Remove DataBuf::copyBytes and use std::copy instead
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
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 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
2834fa5f05
Use [[maybe_unused]]
3 years ago
Rosen Penev
63e41c3aeb
clang-tidy: simplify bool
...
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
04bacdedd6
clang-tidy: use auto
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
962e3b7369
clang-tidy: use default
...
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
Luis Díaz Más
aec36f86d7
Replace naked new operators
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
21eb0cec4f
Fix build when EXIV2_BUILD_MESSAGES is ON
3 years ago
Luis Díaz Más
76f01fd4d3
Clean more header inclusions
3 years ago
Luis Díaz Más
59f4d0de27
cppcheck: reduce scope of variables
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
81cfc162c1
Use std::move to transfer ownership of DataBufs.
4 years ago
Kevin Backhouse
5fdd9da3d3
Use =default.
4 years ago
Kevin Backhouse
482cb2ded5
Clarify ownership model of CiffComponent::pData_
4 years ago
Kevin Backhouse
e71b99b236
Merge pull request #1886 from kevinbackhouse/private-pData
...
Make fields of DataBuf private
4 years ago
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.
4 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
Kevin Backhouse
ad5e6c479c
Extra checking to prevent the loop counter from wrapping around.
4 years ago
Kevin Backhouse
fa52d7e2cb
Better way to print the error message.
4 years ago
Kevin Backhouse
6685b8db4a
Print message to stderr when EXIV2_DEBUG_MESSAGES is enabled.
4 years ago