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
5d08bb9bec
Merge pull request #2146 from Exiv2/mainDatesWithZeros
...
DateValue is now a bit more permissive with malformed dates
2022-03-12 16:56:11 +01:00
Luis Díaz Más
c115d4daf7
Merge pull request #2131 from Exiv2/mainCleanups
...
Include what you use + more SPDX identifiers + few other cleanups
2022-03-11 21:02:45 +01:00
Luis Diaz
56c52be8b5
DateValue is now a bit more permissive with malformed dates
2022-03-11 19:57:55 +01:00
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>
2022-03-09 17:12:29 -08: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
2834fa5f05
Use [[maybe_unused]]
2022-03-07 22:25:51 +01:00
Rosen Penev
a25bbe133f
constexpr string conversions
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-03-04 15:54:05 -08:00
Rosen Penev
04bacdedd6
clang-tidy: use auto
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-03-04 15:54:05 -08:00
Rosen Penev
118aa78aa0
clang-tidy: use braced init list
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-03-04 15:54:05 -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
59f4d0de27
cppcheck: reduce scope of variables
2022-02-18 18:01:02 +01:00
Luis Díaz Más
ea201ce613
Remove dead code
2022-02-18 18:01:02 +01:00
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.
2022-02-12 21:16:18 +00: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
Robin Mills
13a2cf336d
fix_1416_iptc_DateCreated ( #1547 )
...
* fix_1416_iptc_DateCreated
* Fix unit tests
* DateValue:read 2nd iteration on pre-condition
* test with ISO_8601 date format
* Use std::regex for ISO 8601 basic & extended date formats
* Use std::regex for ISO 8601 basic & extended time formats
* Add more tests & notes for DateValue & TimeValue
* Comment tests using local calendar times
* DateValue::write also adds padding to year field
Co-authored-by: Luis Díaz Más <piponazo@gmail.com>
2021-12-14 11:20:02 +01:00
Kevin Backhouse
644aaaac92
Check that the string isn't empty
2021-08-01 23:31:56 +01:00
Kevin Backhouse
dc2c77ce81
Safer std::vector indexing.
2021-07-18 14:40:45 +01:00
Kevin Backhouse
d5ada325af
Check that type isn't an empty string.
2021-07-18 14:14:02 +01:00
Kevin Backhouse
a4c5bdac19
fix: stricter date parsing in value.cpp ( #1720 )
...
* Regression test for issue 1713
* Stricter date parsing.
* Fix test failure caused by stdout mismatch.
(cherry picked from commit ab58026cff0e5edebc026261e9dc4b7db05b802d)
2021-06-27 10:21:38 +02:00
mergify[bot]
1d64f482ff
fix: use vector::at() rather than operator[] (backport #1735 ) ( #1741 )
...
* fix: use vector::at() rather than operator[] (#1735 )
* Regression test for https://github.com/Exiv2/exiv2/issues/1706
* Use vector::at() rather than operator[].
* Print to stderr when exception is caught and EXIV2_DEBUG_MESSAGES is enabled.
* Check that it prints "Bad value" for the date.
(cherry picked from commit f4d3adbf91e6dc4e34aee5bac7b7fd9e127a5c00)
# Conflicts:
# src/value.cpp
* fix merge conflicts from mergify backport
Co-authored-by: Kevin Backhouse <kevinbackhouse@github.com>
Co-authored-by: Christoph Hasse <hassec@users.noreply.github.com>
2021-06-27 09:33:56 +02:00
Kevin Backhouse
2b84f4bd64
fix: zero initialize local variables. ( #1743 )
...
* Zero initialize local variables.
* Initialize xmpID_
2021-06-27 08:56:31 +02:00
Kevin Backhouse
3e099da7b7
Remove obsolete snprintf macros.
2021-06-22 18:25:52 +02:00
Rosen Penev
2c57f214c5
clang-tidy: use nullptr
...
Found with modernize-use-nullptr
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-26 08:31:45 +02:00
Rosen Penev
ff39473c18
clang-tidy: convert to static
...
Found with readability-convert-member-functions-to-static
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-19 14:45:20 +02:00
Rosen Penev
b8712188bb
clang-tidy: use auto
...
Found with modernize-use-auto
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-17 21:52:03 +02:00
Rosen Penev
20dfab8036
manual for range loop conversions
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-17 10:30:42 +02:00
Rosen Penev
c73dfa0106
clang-tidy: use uppercase numeric literals
...
Found with readability-uppercase-literal-suffix
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-16 11:27:49 +02:00
Rosen Penev
2e73aa9dc0
default con/destructors in headers
...
Helps to optimize trivially destructable stuff.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-12 09:10:36 +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
8128716287
clang-tidy: use = default
...
Found with modernize-use-equals-default
Ran through git clang-format
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-09 15:18:50 +02:00
Rosen Penev
e93ad82734
clang-tidy: use braced init list
...
Found with modernize-return-braced-init-list
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-03 06:55:09 +02:00
Luis Díaz Más
01a3bc716d
Fix warnings in VS
2021-04-19 10:43:46 +02:00
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
2021-04-18 18:49:58 +02:00
Luis Díaz Más
83dda6ccd7
Fix warnings related to -Wdeprecated-copy
2021-04-18 18:49:58 +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
Robin Mills
717fc098be
fix_1486_effort2 https://github.com/Exiv2/exiv2/pull/1486#discussion_r593161473
2021-03-12 13:16:17 +00:00
clanmills
ba6a577ab9
https://github.com/Exiv2/exiv2/pull/1486#issuecomment-796843835
2021-03-11 18:31:52 +00:00
Miloš Komarčević
fa41e52c8a
Add comment and test case
2021-03-11 14:26:50 +01:00
Miloš Komarčević
26ba26e241
Terminate empty ASCII strings as well
2021-03-10 21:44:12 +01:00
postscript-dev
5f563b5255
Fix spelling mistakes in LangAltValue::read()
...
Removed unneeded comments and empty space.
2021-03-09 12:13:48 +00:00
postscript-dev
282d1d6995
Add static to LangAltValue::read() const values
2021-03-08 10:27:11 +00:00
postscript-dev
6cd9263fa7
Fix langAltValue::read() parsing
...
+ Fix segmentation faults in langAlt parse
+ Fix mismatched quotation marks and incorrect values
+ Add Python testing
+ Some tests commented out as quotation marks are filtered, preventing them
from running.
Closes #1481 .
2021-03-06 18:59:31 +00:00
Robin Mills
9b5108583b
Revert "Revert "fix_1431_binary_comment.""
...
This reverts commit 2866415322 .
2020-12-14 20:29:27 +00:00
Robin Mills
c6167258ce
Revert "Restored 0.27.2 "toString()" behaviour of Exifdatum.value().toString() for CommentValue."
...
This reverts commit ecae9dc6eb .
2020-12-14 20:15:42 +00:00
Robin Mills
2866415322
Revert "fix_1431_binary_comment."
...
This reverts commit b6bf20a897 .
2020-12-14 20:01:17 +00:00
Robin Mills
ecae9dc6eb
Restored 0.27.2 "toString()" behaviour of Exifdatum.value().toString() for CommentValue.
2020-12-13 20:55:17 +00:00
Robin Mills
b6bf20a897
fix_1431_binary_comment.
2020-12-11 15:10:35 +00:00