Commit Graph

63 Commits

Author SHA1 Message Date
Rosen Penev 842ef05ee6 return nullptr instead of reset
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-01-05 23:29:31 -08: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 5a08e33fd8 sonarlint: replace loop with find_if
Sonarlint complains about this loop for some reason. Convert to find_if
to fix.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-07-27 11:29:57 -07:00
Rosen Penev 9ca7f861cf remove string_view from headers
This should allow usage with C++11 projects. It's also wrong. The only
user of this assigns an std::string from a string_view, which is not
safe.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-07-24 16:37:25 -07:00
Luis Díaz Más d4ffcb9497 utils are in Internal namespace 2022-04-14 10:41:07 +02:00
Luis Díaz Más d5742f449b Move string helpers to utils 2022-04-14 10:41:01 +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
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 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 f894ee0568 Fix debug builds 2022-03-08 10:13:22 +01:00
Luis Díaz Más b3a216310a Removing unused headers thanks to IWYU 2022-03-07 22:25:51 +01: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 8b3da36f42 Improvements from code review 2022-02-19 17:27:29 +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 a6185d29c6 Image::setComment now takes string_view 2022-02-18 18:01:02 +01: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 db4b63937e Add some TODO comments 2022-02-05 11:02:03 +01:00
Jim Easterbrook 02ce7e9aff Restore modified tags after TZ manipulation
This ensures that Xmp date/times that have been set by the user aren't
over written by the TZ restoration efforts. This fixes bug #1998
2021-11-15 10:18:05 +00:00
Kevin Backhouse dc2c77ce81 Safer std::vector indexing. 2021-07-18 14:40:45 +01:00
Rosen Penev 86c71ae6c3 clang-tidy: avoid global non const variables
Found with cppcoreguidelines-avoid-non-const-global-variables

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-25 08:43:27 +02:00
Rosen Penev c44c289d76 clang-tidy: fix ending namespace comnments
Found with llvm-namespace-comment

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-19 23:08:08 -07:00
Rosen Penev 743da1a564 clang-tidy: use C++ casting
Found with google-readability-casting

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-20 07:29:02 +02:00
Rosen Penev f9d394adf0 clang-tidy: run through performance checks
Found with performance*

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-18 14:30:08 +02:00
Rosen Penev 8337462032 clang-tidy: use empty() instead of comparing size
Found with readability-container-size-empty

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-11 22:02:47 +02:00
Rosen Penev 1dc1186760 clang-tidy: simplify boolean expressions
Found with readability-simplify-boolean-expr

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-09 17:30:46 +02:00
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>
2021-05-03 14:50:04 +02:00
Luis Díaz Más 75bf666d3b Remove typedef to Dictionary::const_iterator 2021-04-19 10:43:46 +02:00
Luis Díaz Más 0bbaa6eff3 cpp: Replace auto_ptr by unique_ptr 2021-04-15 06:56:11 +02:00
Robin Mills d632988bbd Massive code prolog cleanup. 2021-03-17 13:34:21 +00:00
Luis Díaz Más 113136e134 Replace DEBUG with EXIV2_DEBUG_MESSAGES
Fixes #926
2019-07-12 11:14:35 +02:00
Robin Mills fe3f3248dd Fix in sidecar files #589 2019-05-05 10:03:54 +02:00
Luis Díaz Más 603692a1d8 Copyright to Exiv2 authors 2018-09-12 19:22:31 +02:00
tbeu 75cdbc8b91 Use pre-increment on iterators
V803 Decreased performance. In case 'userEnd' is iterator it's more effective to use prefix form of increment. Replace iterator++ with ++iterator. futils.cpp 405
V803 Decreased performance. In case 'authEnd' is iterator it's more effective to use prefix form of increment. Replace iterator++ with ++iterator. futils.cpp 410
V803 Decreased performance. In case 'hostEnd' is iterator it's more effective to use prefix form of increment. Replace iterator++ with ++iterator. futils.cpp 428
V803 Decreased performance. In case 'e' is iterator it's more effective to use prefix form of increment. Replace iterator++ with ++iterator. epsimage.cpp 711
V803 Decreased performance. In case 'e' is iterator it's more effective to use prefix form of increment. Replace iterator++ with ++iterator. epsimage.cpp 841
V803 Decreased performance. In case 'e' is iterator it's more effective to use prefix form of increment. Replace iterator++ with ++iterator. epsimage.cpp 958
V803 Decreased performance. In case 'i' is iterator it's more effective to use prefix form of increment. Replace iterator++ with ++iterator. epsimage.cpp 855
V803 Decreased performance. In case 'it' is iterator it's more effective to use prefix form of increment. Replace iterator++ with ++iterator. jpgimage.cpp 817
V803 Decreased performance. In case 'lib' is iterator it's more effective to use prefix form of increment. Replace iterator++ with ++iterator. version.cpp 508
V803 Decreased performance. In case 'it' is iterator it's more effective to use prefix form of increment. Replace iterator++ with ++iterator. version.cpp 563
V803 Decreased performance. In case 'it' is iterator it's more effective to use prefix form of increment. Replace iterator++ with ++iterator. xmpsidecar.cpp 138
2018-06-02 09:43:20 +02:00
Dan Čermák efe2ccdcb6 Replaced all hardcoded error codes with ker... constants 2018-02-18 09:28:57 +01:00
tbeu 5b5987a596 Remove obsolete EXIV2_RCSID 2017-11-19 11:17:12 +01:00
tbeu 5df8b01b77 Remove obsolete svn revision 2017-11-19 11:17:11 +01:00
clanmills 935421c855 Refactoring autotools to support ADOBE_XMPSDK (Work in Progress) 2017-08-15 20:00:09 +01:00
Robin Mills 6d5c2c3256 Getting ready to release v0.26 2017-03-08 20:42:28 +00:00
Robin Mills 2ebacb6b0b #1272 Use in-memory temporary files. 2017-03-05 17:42:12 +00:00
Robin Mills 9501be5c7d #1112. Fix submitted. Also added typedefs to datasets.hpp for Exiv2::Dictionary, Exiv2::StringSet, Exiv2::StringVector 2015-09-03 20:21:36 +00:00
Andreas Huggel fd80993ab0 Updated copyright notice. 2015-05-02 11:55:40 +00:00
Robin Mills be1649e1ee #774. Fix MSVC compiler warning. 2015-04-10 17:48:24 +00:00
Robin Mills e3b26b97ba #774. Thanks to Alan for resolving this matter and providing the patch. 2015-04-08 21:32:04 +00:00
Robin Mills d393b0fa7e trunk: exiv2 v0.25 2014-12-25 13:55:57 +00:00
Andreas Huggel f09fceda6b Updated copyright year in a few files, version in runner.txt. 2013-12-01 12:13:42 +00:00
Robin Mills a297d2b69e Rollback 3089 - somehow it's broken the build! 2013-07-24 05:05:52 +00:00
Robin Mills da1ed8c536 Bumping the copyright notice in src &samples from 2012 to 2013 2013-07-24 03:12:38 +00:00
Andreas Huggel 0d397b95c7 Updated copyright message for 2012. 2012-03-22 15:19:35 +00:00