Commit Graph

58 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
3633f8d2c2 clang-tidy: remove const from data members
Found with cppcoreguidelines-avoid-const-or-ref-data-members

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-04-03 06:53:25 -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
22b12012a6 more SonarLint cleanups
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
2205a14a06 clang-tidy: default init various members
Found with cppcoreguidelines-pro-type-member-init

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-02-25 15:46:42 -08:00
Rosen Penev
9f21b78311 add contains function
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-02-14 00:48:41 -08:00
Rosen Penev
5eebbbcbfb make conversions explicit
Found with MSVC's C4244

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-02-13 09:35:03 -08:00
Rosen Penev
7fd7ee62a3 std::find to find template
std::find in C++20 can use ranges, which is equivalent here. Less error
prone.

Namespace is properly to avoid any conflicts with std::find or others

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-01-27 07:47:18 -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
d856ca7d82 cland-tidy: simplify booleans
Found with readability-simplify-boolean-expr

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-09-27 06:40:37 -07:00
Rosen Penev
71dc04ebb1 misc sonarlint stuff
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-08-22 23:00:32 -07:00
Rosen Penev
2fa84f4bab remove using
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-08-21 14:37:18 -07: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
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
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
97e58a4573
Merge pull request #2267 from neheb/clang
mostly clang-tidy fixes
2022-07-09 21:50:50 +01:00
Kevin Backhouse
7f673c766d
Fix some "signed shift" warnings 2022-07-06 22:22:30 +01:00
Rosen Penev
9f989e4228 clang-tidy: use auto
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-07-05 17:41:12 -07:00
Rosen Penev
84555f1ad5 clang-tidy: no else after return
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-07-05 15:29:42 -07:00
Rosen Penev
c2be02145d clang-tidy: use C++ casts
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-07-05 15:29:42 -07:00
Kevin Backhouse
7ebf2a184e
Merge pull request #2231 from kevinbackhouse/exiv2app-types-cleanup
types cleanup exiv2app.hpp
2022-05-23 10:24:01 +01:00
Kevin Backhouse
1ceddb2962
Replace long with int64_t in exiv2app.hpp 2022-05-22 19:59:11 +01:00
Rosen Penev
cf963e9e4d clang-tidy: C casts to C++
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-05-21 17:58:10 -07:00
Rosen Penev
3a8a8b29a2 std::pair conversion
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-04-14 18:06:04 -07:00
Rosen Penev
a8061e7ee9 clang-tidy: default member init
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-04-14 18:01:55 -07:00
Luis Díaz Más
f942ba89bd Move Photoshopb class to internal namespace 2022-04-10 10:55:10 +02:00
Luis Díaz Más
d7f35e33f0 Remove useless static_casts 2022-03-25 08:43:37 +01: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
c5c315b6e7 Usage of EXIT_SUCCESS/FAILURE instead of hard-coded values 2022-03-23 16:55:18 +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
1bf7f44f53 Rename variables for better readability 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
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
96f7f2e4c5 Convert Exiv2::ErrorCode into an enum class 2022-03-12 16:58:40 +01:00
Luis Díaz Más
85d6082d7f Should fix build in some Linux distros 2022-03-08 11:21:24 +01: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
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
b3517a6ab0 Build hash table in place 2022-02-27 09:36:46 +01:00
Luis Díaz Más
06ff936d06 Replace dynamic array for std::vector 2022-02-27 09:36:46 +01:00