71 Commits (8ba9003f1978ad7bb500bac0a199fb5d73f07366)

Author SHA1 Message Date
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
Luis Díaz Más 0f03e77634 Simplify code around UniquePtr(s) & use make_unique over new 3 years ago
Kevin Backhouse b6a4fd1c67
Add storage parameter to setData. 4 years ago
Kevin Backhouse 9f3240c91c
Delete TiffEntryBase::isMalloced_ field and use a std::shared_ptr instead. 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
Rosen Penev f3fcffd6e6 remove most usages of std::make_pair
Better alternatives exist with C++11.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Kevin Backhouse a1b65a7928
Merge pull request #1849 from Exiv2/mergify/bp/main/pr-1848
Replace assertion with an error message (backport #1848)
4 years ago
Kevin Backhouse 9fd8b40a4e Replace assertion with an error message.
(cherry picked from commit cb32b809c80163c2392543dfb830dffe44e47f91)
4 years ago
Kevin Backhouse 9e160a453b
Replace assertion with an error message. 4 years ago
Kevin Backhouse e34e150f22 Replace assertion with an error message.
(cherry picked from commit 4ec1768415ba015041a9bb28ab17c1ccf6a8c63e)
4 years ago
Kevin Backhouse 69d82ffe01
Defensive coding changes to avoid integer overflow in loop conditions. 4 years ago
Luis Díaz Más f30022d73d
Fix issues detected with PVS-Studio + other little improvements (#1689)
* avoid re-declaration of constant variables

* Replace pthreads critical section with std::mutex

* ci - better naming

* cmake - increase minimum version to 3.11. Use project DESCRIPTION

* fix - do not treat string::find() return type as bool

* remove conditions that were always true

* remove condition that were always false

* Remove EXV_HAVE_GMTIME_R which is not used anymore

* pixelWidth_ was inherited from Exiv2::Image

The width & height variables in the TiffImage class need to be mutable
to be able to change their values on the getters pixelHeight() and
pixelWidth() ... Do not ask me why ...

* Remove superfluous if

* pvs:V766 item with identical key added already

* pvs:V730 not all members were initialized (time)

* pvs:V730 not all members are initialized

* pvs:v668 no point in testing pointer against null after new

* pvs:V1048 variable assigned the same value

* replace c-style dynamic vector with std one

* pvs:547 fakeData is always true

* Remove useless constructor in derived class

* pvs:V690 modern way to disable copy-ctor

* Replace malloc/free with new/delete. No need to check for null

* pvs:V1028 cast operands and not result

* Remove custom MIN/MAX functions

* pvs:V595 pointer used before verified against null

* pvs: index used before being checked

* pvs:V1028 possible overflow. Cast operands

* pvs:v575 potential null pointer passed to other functions

* pvs:V547 deal with always true/false expressions

* pvs:V560 part of conditional expressions always false or true

* pvs:V701 possible break in realloc -> move to std::vector

* Make some classes 'final'

* Replace sprintf with std::to_string()

* fix compilation on windows
4 years ago