Commit Graph

59 Commits

Author SHA1 Message Date
Rosen Penev
6fd143d6a4 sonarlint cleanups
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-04-12 09:01:53 -07:00
Rosen Penev
024e026bbb clang: small fixes
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-03-22 06:11:10 -07:00
Rosen Penev
ca95edc6bd random fixes
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-03-20 08:01:22 -07:00
Rosen Penev
1f21164085 gcc: remove redundant struct
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-03-20 08:01:22 -07:00
Rosen Penev
9a1f37ecbe get rid of Key() move operations
Because of Impl, there's no way this can work properly.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-03-20 08:01:22 -07:00
Rosen Penev
55d16ac76b use GetCurrentProcessId on Windows
matches what is done elsewhere

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-02-25 15:46:42 -08:00
Rosen Penev
35b6780d02 clang-tidy: don't assign in if
Found with bugprone-assignment-in-if-condition

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-02-11 10:44:20 -08:00
Rosen Penev
d874fc4dd8 use __has_include
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-01-29 12:21:47 -08:00
Rosen Penev
376638259d namespace enforce.hpp functions to Internal
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-01-29 11:14:59 -08:00
Rosen Penev
77834807c2 add support for gcc and clang 7
Uses std::experimental::filesystem

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-01-29 09:29:46 -08:00
Rosen Penev
6976aab5bd replace substr with resize/pop_back
Shorter and more efficient.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-01-26 22:44:43 -08:00
Rosen Penev
bb311ba728 clang-tidy on Windows
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-01-04 01:40:27 -08:00
Rosen Penev
b6c2062fae std::to_string conversions
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-08-17 02:25:10 -07:00
Rosen Penev
6cf06c6534 remove constructor
It can be implicitly generated.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-08-08 23:23:31 -07:00
Rosen Penev
fc840405cc revert std::function back to function pointers
The former has too much overhead. No point in it.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-08-08 19:24:47 -07:00
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>
2022-08-08 15:31:05 -07:00
Rosen Penev
e74feff4d8 strcmp to == conversions
Does the same thing.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-08-03 01:36:19 -07:00
Rosen Penev
1d0530f04d misc sonarlint changes
Mostly const changes.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-07-31 20:51:12 -07:00
Rosen Penev
5b737ca541 sonarlint: add an empty do while loop
Avoids warnings regarding unnecessary semicolons.

Remove _fileno as it is unused.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-07-27 11:29:57 -07:00
Rosen Penev
aae02babba sonarlint: replace lock_guard with scoped_lock
C++17 allows scoped_lock, which sonarlint recommends.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-07-27 11:29:57 -07:00
Rosen Penev
3ae1d3b48e return make_unique directly
Simpler

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-07-24 23:00:02 -07:00
Peter
dc4ae73013
Add tag description option to exiv2 app (#2279)
* Add `tagDesc()` to (Exif|Xmp|Iptc) Datums and Keys
* Add `--Print d` option to exiv2 app
* Add testing for all exiv2 application `--Print` options
* Update manpage
2022-07-12 15:31:43 +01:00
Kevin Backhouse
1ceddb2962
Replace long with int64_t in exiv2app.hpp 2022-05-22 19:59:11 +01:00
Kevin Backhouse
2e0ab1a037
More bounds checking in Adjust::adjustDateTime 2022-05-22 19:55:01 +01:00
Luis Díaz Más
c9bdd6ed94
Merge pull request #2209 from Exiv2/mainTODOs
Improvements around TODO comments
2022-04-29 09:04:46 +02:00
Rosen Penev
2e721a716e std::function conversions
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-04-18 13:02:32 -07:00
Luis Díaz Más
c3d0100d48 Fixing bad usages of DataBuf (when it is empty) 2022-04-14 10:40:58 +02:00
Rosen Penev
043547cbd0 remove various usages of memset
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-03-27 01:47:02 -07:00
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
7119b7676f remove templating & simplify error message
+ clang-format in Error files
+ Remove AnyError
2022-03-12 16:58:41 +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
Luis Díaz Más
cca6f74200 windows.h 2022-03-08 10:07:25 +01: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
5508e6f466 hexdump to size_t 2022-03-07 22:25:51 +01:00
Luis Díaz Más
867132f7c7 _fileno is only for Windows 2022-03-07 22:25:35 +01:00
Luis Díaz Más
23da0c3955 Do not define not needed stuff 2022-03-07 22:25:35 +01:00
Rosen Penev
6d1fa2ecea clang-tidy: use empty() instead of size()
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-03-05 16:21:26 -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
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
208ec70df8 Fix windows builds 2022-02-27 13:48:21 +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
f1e04ee866 Replace DataBuf internal buffer with std::vector 2022-02-27 09:36:46 +01:00
Luis Díaz Más
7caf4090b1 Use fs::file_size instead of stat 2022-02-18 22:48:01 +01:00
Luis Díaz Más
ea201ce613 Remove dead code 2022-02-18 18:01:02 +01:00
Luis Díaz Más
56b5ab9a29 Use remove from filesystem 2022-02-18 18:01:02 +01:00