234 Commits (2ddf00e7a2a3b4d4fce06f66ca67cbd662ebe506)

Author SHA1 Message Date
Rosen Penev d248e1a2af more delete removals
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev 7aaf6414f2 move initialization up
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev 0d353ac5f3 work around windows.h min/max macros
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev d874fc4dd8 use __has_include
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev 376638259d namespace enforce.hpp functions to Internal
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev 77834807c2 add support for gcc and clang 7
Uses std::experimental::filesystem

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev bb311ba728 clang-tidy on Windows
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Kevin Backhouse 335e13251e Add #error so the build fails if mmap isn't supported. 3 years ago
Kevin Backhouse 5cabd97373 Fix issue 2380: bug in (unused) non-mmap code. 3 years ago
Kevin Backhouse c96bc47509 Change return type of getFileLength() to int64_t. 3 years ago
Rosen Penev e151daa0fc fix compilation without mmap and non win32
buf was refactored not to be a pointer.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev 5c90684441 simplify some defines
As far as I can tell, _WIN32 is defined for true Windows platforms.
Cygwin is a POSIX platform.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev f3b572d211 fix iconv handling and windows
WIN32 as a define is wrong. _WIN32 is the correct one.

Which opens up the issue of the used functions and the wrong logic.
Changed the function logic to use if and elif, as done later in the
code.

Also changed all usages of WIN32 with _WIN32

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev 306424f589 remove c_str for fs stuff
fs::path is convertable to a string.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev b8855fb3b5 misc sonarlint cleanups
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev 5d2d47032b replace [0] with front() where applicable
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Kevin Backhouse a5c521ea57
Merge pull request #2252 from neheb/2
clang-tidy: use default member init
3 years ago
Rosen Penev bae7da19ca clang-tidy: use default member init
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Kevin Backhouse ad4e13b827
Change return type of BasicIo::tell() to size_t. 3 years ago
Rosen Penev 0dcd8605c9 fix mmap compilation
CI doesn't catch all cases failing.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev d789968e90 replace malloc/free with new/delete
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev e9896d1f99 clang-tidy: fix inconsistent decleration
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev 9f67620503 clang-tidy: add more nodiscard
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev fafe999c6e remove unused var from deleted stuff
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Luis Díaz Más d7f35e33f0 Remove useless static_casts 3 years ago
Luis Díaz Más b05573fadc Remove most of the asserts from codebase 3 years ago
Luis Díaz Más 30bf563f4d Update .clang-format file & apply clang-format to whole project 3 years ago
Luis Diaz 7576a2757b More size_t for sizes 3 years ago
Luis Díaz Más 96f7f2e4c5 Convert Exiv2::ErrorCode into an enum class 3 years ago
Luis Díaz Más c115d4daf7
Merge pull request #2131 from Exiv2/mainCleanups
Include what you use + more SPDX identifiers + few other cleanups
3 years ago
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>
3 years ago
Rosen Penev 9f949195e4 clang-tidy: add ending namespace comment
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Luis Díaz Más 8b1fe379a1 Removing unused headers thanks to IWYU 3 years ago
Rosen Penev f0d23eca9b clang-tidy: add some missing operators
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev daf7c890e2 misc stuff
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev 5833101b9b manual nullptr conversions
Mostly not caught because I'm not running clang-tidy on Windows.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev a25bbe133f constexpr string conversions
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev 04bacdedd6 clang-tidy: use auto
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev f65848a590 simplify ReplaceStringInPlace slightly
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev 5d60a91ebc move initializations to class
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev a67e0d525f move namespace fs below includes
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 f1e04ee866 Replace DataBuf internal buffer with std::vector 3 years ago
Luis Díaz Más aec36f86d7 Replace naked new operators 3 years ago
Luis Díaz Más 8b3da36f42 Improvements from code review 3 years ago
Luis Díaz Más d11479e53c Replace dynamic C array by std::vector 3 years ago
Luis Díaz Más ea201ce613 Remove dead code 3 years ago
Luis Díaz Más 1d243ed40e Remove dead code: copyXattrFrom 3 years ago
Luis Díaz Más c0b663b7ea Remove dead code (LSTAT) 3 years ago