119 Commits (8b1fe379a1dd444026b6aa06750eed4929a1ac49)

Author SHA1 Message Date
Rosen Penev 04bacdedd6 clang-tidy: use auto
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
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
3 years ago
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
3 years ago
Luis Díaz Más 5d627433fc Remove useless DataBuf::clear() 3 years ago
Luis Díaz Más 3a749e6861 No need to define copy & move ctors 3 years ago
Luis Díaz Más 2bacff0f5c Simplify DataBuf 3 years ago
Luis Díaz Más f1e04ee866 Replace DataBuf internal buffer with std::vector 3 years ago
Luis Díaz Más 7933ff401d Remove dead code around EXV_UNICODE_PATH 3 years ago
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.
3 years ago
Luis Díaz Más 524fad42e1 Remove useless ops 3 years ago
Kevin Backhouse 29f7d0ccf0
Remove DataBuf::release() which is no longer used. 4 years ago
Kevin Backhouse 81cfc162c1
Use std::move to transfer ownership of DataBufs. 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 7c2ab1d7de
Check that the float is within the range of an int before casting. 4 years ago
Kevin Backhouse dc2c77ce81
Safer std::vector indexing. 4 years ago
Kevin Backhouse 2b84f4bd64
fix: zero initialize local variables. (#1743)
* Zero initialize local variables.

* Initialize xmpID_
4 years ago
Christoph Hasse 758dd6bbc6 refactor!: remove free() function from DataBuf to avoid potential problems, see #1542 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 743da1a564 clang-tidy: use C++ casting
Found with google-readability-casting

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 c73dfa0106 clang-tidy: use uppercase numeric literals
Found with readability-uppercase-literal-suffix

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
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>
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 e93ad82734 clang-tidy: use braced init list
Found with modernize-return-braced-init-list

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Robin Mills d632988bbd Massive code prolog cleanup. 4 years ago
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>
5 years ago
Luis Díaz Más d1c2e2f64f bindtextdomain point to relative path to bin directory 7 years ago
Luis Díaz Más 417ad89e4b Pass argument by const reference 7 years ago
Dan Čermák 962962a8e9 Port Iptc::printStructure & getUshort to slices API
This fixes #211, #210, #209
7 years ago
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.
7 years ago
Luis Díaz Más 989acd18c7 Fix cppcheck issues: uninitMemberVar & uninitVar 7 years ago
Dan Čermák 916c535d94 clang-format floatToRationalCast 7 years ago
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
7 years ago
Luis Díaz Más b9f913d5af Move implementation to .cpp files. Fix more issues related to visibility settings 7 years ago
Luis Díaz Más 603692a1d8 Copyright to Exiv2 authors 7 years ago
Luis Díaz Más 0bfa0168df Cleanup some of the PACKAGE_XXX variables and rely in the ones given by the project() command 7 years ago
Luis Díaz Más 980f2e9462 Use isnan(f) as an alternative to isinf() on __APPLE__ 7 years ago
Luis Díaz Más 2ae0cffe18 isinf for Visual Studio versions previous to 2013 7 years ago
Dan Čermák 11df43be78 [types] Apply Safe::abs() in floatToRationalCast & gcd
Also check for infinity in floatToRationalCast as depending on the
compiler special values of floats are converted to either
LONGMAX/LONGMIN or +/-inf
7 years ago
Luis Diaz Mas 00f86a8df4 Cleanup unused variable warnings 7 years ago
Dan Čermák b12a868454 Add EXV_WARN_UNUSED_RESULT macro & add it to DataBuf::release()
EXV_WARN_UNUSED_RESULT is a conditional macro that expands to either
__attribute__((warn_unused_result)) on gcc & clang or to _Check_return
for MSVC
=> Compiler warns if the return value is ignored
7 years ago
Dan Čermák 1b74db8f51 [types] Add DataBuf::free()
DataBuf::release() easily cause memory leaks, when the return value is
ignored. free() provides the desired behavior, when the internal data should
just be deleted and not used further.
7 years ago
tbeu 5b5987a596 Remove obsolete EXIV2_RCSID 8 years ago
tbeu 5df8b01b77 Remove obsolete svn revision 8 years ago
Michał Walenciak ab27bfab3c introducing getULongLong() 8 years ago
Robin Mills 559ace375b #1291 Reverting change in r4763 relating to windows.h as they break the Cygwin build. Retain changes in exiv2/exiv2.hpp and exv_msvc.h 8 years ago
Robin Mills f36cccefa2 #1291 include header simplification 8 years ago
Robin Mills 6d5c2c3256 Getting ready to release v0.26 8 years ago