Luis Díaz Más
ae4df71233
Remove DataBuf::copyBytes and use std::copy instead
2022-03-23 17:17:29 +01:00
Luis Díaz Más
b05573fadc
Remove most of the asserts from codebase
2022-03-23 16:55:18 +01: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
Rosen Penev
b2b6d834ba
some std::array conversions ( #2148 )
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-03-15 10:17:06 +01:00
Luis Diaz
7576a2757b
More size_t for sizes
2022-03-14 11:50:42 +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
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
Rosen Penev
b6bdbf5574
clang-tidy: don't use else after return/throw
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-03-07 14:42:33 -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
Luis Díaz Más
5508e6f466
hexdump to size_t
2022-03-07 22:25:51 +01:00
Rosen Penev
04bacdedd6
clang-tidy: use auto
...
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
5d627433fc
Remove useless DataBuf::clear()
2022-02-27 09:36:46 +01:00
Luis Díaz Más
3a749e6861
No need to define copy & move ctors
2022-02-27 09:36:46 +01:00
Luis Díaz Más
2bacff0f5c
Simplify DataBuf
2022-02-27 09:36:46 +01:00
Luis Díaz Más
f1e04ee866
Replace DataBuf internal buffer with std::vector
2022-02-27 09:36:46 +01:00
Luis Díaz Más
7933ff401d
Remove dead code around EXV_UNICODE_PATH
2022-02-13 22:49:32 +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
524fad42e1
Remove useless ops
2022-02-05 11:08:13 +01:00
Kevin Backhouse
29f7d0ccf0
Remove DataBuf::release() which is no longer used.
2021-12-24 12:35:46 +00:00
Kevin Backhouse
81cfc162c1
Use std::move to transfer ownership of DataBufs.
2021-10-10 23:56:00 +01:00
Kevin Backhouse
9ff72e5ca5
Make offset=0 the default parameter.
2021-08-30 12:41:08 +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
Kevin Backhouse
7c2ab1d7de
Check that the float is within the range of an int before casting.
2021-08-04 15:21:31 +01:00
Kevin Backhouse
dc2c77ce81
Safer std::vector indexing.
2021-07-18 14:40:45 +01:00
Kevin Backhouse
2b84f4bd64
fix: zero initialize local variables. ( #1743 )
...
* Zero initialize local variables.
* Initialize xmpID_
2021-06-27 08:56:31 +02:00
Christoph Hasse
758dd6bbc6
refactor!: remove free() function from DataBuf to avoid potential problems, see #1542
2021-05-27 08:26:00 +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
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
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
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
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
1b9b77c51f
clang-tidy: add ending namespace comments
...
Found with google-readability-namespace-comments
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-14 17:34:09 +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
Robin Mills
d632988bbd
Massive code prolog cleanup.
2021-03-17 13:34:21 +00:00
Jan Tojnar
48f2c9dbba
cmake: Fix paths with absolute GNUInstallDirs
...
It is not generally true that `CMAKE_INSTALL_<dir>` variables are relative paths:
https://github.com/jtojnar/cmake-snips#concatenating-paths-when-building-pkg-config-files
https://github.com/jtojnar/cmake-snips#assuming-cmake_install_dir-is-relative-path
Let's join them properly as paths, not strings.
On Windows, the absolute paths will likely remain unsupported as neither the CMake function,
nor the C++ code is able to detect absolute paths.
Signed-off-by: Jan Tojnar <jtojnar@gmail.com>
2020-09-05 11:18:46 +02:00
Luis Díaz Más
d1c2e2f64f
bindtextdomain point to relative path to bin directory
2018-11-11 12:27:26 +01:00
Luis Díaz Más
417ad89e4b
Pass argument by const reference
2018-11-07 23:17:26 +01:00
Dan Čermák
962962a8e9
Port Iptc::printStructure & getUshort to slices API
...
This fixes #211 , #210 , #209
2018-10-11 14:06:16 +02:00
Dan Čermák
98bca06592
Add Slices: views of STL containers & C-arrays and add unit tests
...
This commit adds a very simple implementation of std::span but with
mandatory range checks and only the most essential functionality.
2018-10-11 14:06:16 +02:00
Luis Díaz Más
989acd18c7
Fix cppcheck issues: uninitMemberVar & uninitVar
2018-10-11 13:40:03 +02:00
Dan Čermák
916c535d94
clang-format floatToRationalCast
2018-09-17 10:03:02 +02:00
Dan Čermák
6fd1c5b4bf
[types] Fix check for finite numbers on Linux
...
On Linux we were merely checking whether f is finite, but that does
not cover the case f=NaN.
=> use isfinite instead which checks whether f != inf && f != NaN
2018-09-17 10:02:55 +02:00
Luis Díaz Más
b9f913d5af
Move implementation to .cpp files. Fix more issues related to visibility settings
2018-09-14 13:20:08 +02:00
Luis Díaz Más
603692a1d8
Copyright to Exiv2 authors
2018-09-12 19:22:31 +02:00
Luis Díaz Más
0bfa0168df
Cleanup some of the PACKAGE_XXX variables and rely in the ones given by the project() command
2018-09-12 19:22:31 +02:00
Luis Díaz Más
980f2e9462
Use isnan(f) as an alternative to isinf() on __APPLE__
2018-09-12 08:11:54 +02:00