Commit Graph

95 Commits

Author SHA1 Message Date
Rosen Penev
ae3e28c62a make array constexpr
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-03-04 15:54:03 -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
8b3da36f42 Improvements from code review 2022-02-19 17:27:29 +01:00
Luis Díaz Más
476a5e23f9 Replace raw loop for any_of 2022-02-18 18:16:03 +01:00
Luis Díaz Más
a6185d29c6 Image::setComment now takes string_view 2022-02-18 18:01:02 +01:00
Luis Diaz
8e0e00c459 make startsWith constexpr and use string_view 2022-02-18 13:51:39 +01:00
Luis Díaz Más
405f4b5f1b Remove Util::dirname and finally the util files 2022-02-18 13:51:38 +01:00
Luis Díaz Más
49fbfb44a3 Remove startsWith from utils 2022-02-18 13:51:37 +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
Kevin Backhouse
c9d0cf3643
Make fields of DataBuf private. 2021-08-29 15:43:10 +01:00
Rosen Penev
f3fcffd6e6 remove most usages of std::make_pair
Better alternatives exist with C++11.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-08-17 19:11:28 -07:00
postscript-dev
510a38e27d
Move all startsWith() funcs to Util namespace
The function checks if a string is in the beginning of another. This
is intended for use until the move to C++20 when
`std::basic_string<>::starts_with()` becomes available. Suggested in
https://github.com/Exiv2/exiv2/pull/1777 .

Separate identical definitions have been moved into a single copy.
2021-07-18 12:00:05 +01:00
Rosen Penev
fdf9d3799c clang-tidy: don't use else after return
Found with llvm-else-after-return

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-15 17:32:56 +02:00
Rosen Penev
5dc4292b40 fix bad for range loop
This loop is supposed to break when it encounters a match.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-13 11:08:29 +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
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
e366c786b9 Fix -Werror=shadow warning after recovering EPS 2021-04-22 20:24:59 +02:00
Luis Díaz Más
d5240a4bda eps: Fix code after usage of unique_ptr. Remove deprecation tags 2021-04-22 18:39:31 +02:00
Luis Díaz Más
8314030604 Revert "Remove deprecated EPS format"
This reverts commit 537cdad99e.
2021-04-22 18:39:31 +02:00
Luis Díaz Más
537cdad99e Remove deprecated EPS format 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
ab6aac054a Remove deprecated code from version source files 2018-09-14 07:43:21 +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
bc58752d18 Remove useless casts
This commit removes only casts where type A is cast to the exactly same
type (and not to a platform dependent typedefs)
2018-05-16 10:15:53 +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
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
b15a401569 #1187 Thank You to Taras for the patch. 2016-05-30 14:45:28 +00:00
Andreas Huggel
fd80993ab0 Updated copyright notice. 2015-05-02 11:55:40 +00:00
Robin Mills
d393b0fa7e trunk: exiv2 v0.25 2014-12-25 13:55:57 +00:00
Robin Mills
4e530fbce0 Bumping the copyright notice again. (re-doing 3089 without breaking the build!) 2013-07-24 05:15:04 +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
vog
8f7a9d8cca Issue #847: Ensure that Photoshop will always recognize modified Photoshop EPS files
For a full description of this issue, see:
http://dev.exiv2.org/issues/847
2012-09-14 17:01:36 +00:00
vog
4a6bb768c8 Issue #847: Split recognition of implicit Page, BeginPageSetup and EndPageSetup 2012-09-14 16:06:29 +00:00
vog
afd9c40e95 Issue #847: Always insert BeginPageSetup/EndPageSetup when missing 2012-09-14 16:06:26 +00:00
vog
7f0c44f802 Issue #847: Add recognition of explicit and implicit BeginPageSetup 2012-09-14 16:06:23 +00:00
vog
d8bb48438c Add more EPS debug output 2012-09-14 16:06:20 +00:00
vog
cc1bb0edc0 Bugfix in EPS debug output 2012-09-14 16:06:18 +00:00
Andreas Huggel
0d397b95c7 Updated copyright message for 2012. 2012-03-22 15:19:35 +00:00
vog
9fa8c893b1 #790: Added workaround for EPS files generated by CorelDRAW 2011-10-04 13:14:05 +00:00
Andreas Huggel
2e1edc8d56 Removed obsolete #include. 2011-09-08 13:33:02 +00:00
vog
50699a8884 drop support for UTF-16/32 encoded XMP in EPS files, which is unrealistic anyway 2011-09-03 16:19:47 +00:00
vog
84ec018c48 fixed indentation 2011-09-03 13:12:43 +00:00
Andreas Huggel
d428a3f10e Another tweak to make older MSVCs happy. 2011-09-03 11:50:59 +00:00
Andreas Huggel
833c030cf9 Removed static keyword from objects in anonymous namespace. 2011-09-02 08:24:23 +00:00