32 Commits (d8732a716ec150d44927a8b3b2604de59090bef4)

Author SHA1 Message Date
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
Rosen Penev 2c57f214c5 clang-tidy: use nullptr
Found with modernize-use-nullptr

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev c44c289d76 clang-tidy: fix ending namespace comnments
Found with llvm-namespace-comment

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev ff39473c18 clang-tidy: convert to static
Found with readability-convert-member-functions-to-static

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev b8712188bb clang-tidy: use auto
Found with modernize-use-auto

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev 20dfab8036 manual for range loop conversions
Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev 1b9b77c51f clang-tidy: add ending namespace comments
Found with google-readability-namespace-comments

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev 2e73aa9dc0 default con/destructors in headers
Helps to optimize trivially destructable stuff.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev 8128716287 clang-tidy: use = default
Found with modernize-use-equals-default

Ran through git clang-format

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev 4ceb325c8f clang-tidy: range for loop conversions
Found with modernize-loop-convert

Ran through git clang-format.

Also removed several questionable loops and replaced with simpler
algorithms.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Luis Díaz Más de4d43d4d1 Fix warnings EXIV2_TEAM_EXTRA_WARNINGS
Most of the warnings fixed were:
- Hiding of local variables
- Hiding of globals
- Useless casts
- Conversions between float/double
4 years ago
Luis Díaz Más 0bbaa6eff3 cpp: Replace auto_ptr by unique_ptr 4 years ago
Robin Mills d632988bbd Massive code prolog cleanup. 4 years ago
Robin Mills d455f473e8 C++ simplification. 4 years ago
Robin Mills 7beb4e3e0d fix_1471_sony2010_0.27 4 years ago
clanmills db1be4ae8e fix_1046_pt-GPSProcessingMethod 5 years ago
Luis Díaz Más 113136e134 Replace DEBUG with EXIV2_DEBUG_MESSAGES
Fixes #926
6 years ago
Luis Díaz Más 603692a1d8 Copyright to Exiv2 authors 7 years ago
Luis Díaz Más 335607054c Use enforce instead of std::assert to fix warning about unused variable in realease mode 7 years ago
Dan Čermák fc60d97a29 Prevent passing of null-pointers to libc functions 7 years ago
Dan Čermák efe2ccdcb6 Replaced all hardcoded error codes with ker... constants 7 years ago
Luis Díaz Más d3748152a7 add _int suffix to all the internal files 8 years ago