Commit Graph

80 Commits

Author SHA1 Message Date
Rosen Penev
b10f2d3e95 geotag: fix compilation with MSYS
using namespace std interferes with windows.h

stat defines interfere with internal headers.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-04-04 06:54:09 -07:00
Rosen Penev
0c0dabfcc7 geotag: add GCC7 support
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-03-25 08:04:14 -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
7a826ac529 clang-tidy: add parentheses to macros
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-04-09 12:19:38 -07:00
Rosen Penev
9f67620503 clang-tidy: add more nodiscard
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-04-01 16:38:03 -07: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
30bf563f4d Update .clang-format file & apply clang-format to whole project 2022-03-16 22:30:53 +01:00
Luis Díaz Más
c0a3242e73 C++-style headers 2022-03-08 10:05:27 +01:00
Luis Díaz Más
bbc99ae581 Use auto for unique pointers 2022-03-07 22:25:51 +01:00
Luis Díaz Más
5a6ec65315 Use SPDX identifiers in more files 2022-03-07 22:25:51 +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
2834fa5f05 Use [[maybe_unused]] 2022-03-07 22:25:51 +01:00
Rosen Penev
77e79b32f5 manual braced init conversion
clang-tidy's not converting these for some reason.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-03-05 01:07:36 -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
432555eae8 Replace platform specific code with std::filesystem 2022-02-13 22:49:32 +01:00
Josh Soref
e56abfa10a
Spelling (#2067)
* spelling: accelerometer

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: address

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: anonymous

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: available

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: baby

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: buffer

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: build

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: builds

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: by inclusion

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: byte order

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: camera

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: command

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: consistency

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: constructor

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: continuous

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: continuously

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: correspond

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: decompression

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: dedicated

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: denominator

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: dependencies

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: detector

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: dlighting

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: dragging

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: duplicate

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: dynamic

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: empty

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: enable

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: endianness

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: examining

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: exceed

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: extension

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: fact

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: fails

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: fixed

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: fluorescent

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: focuspoint

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: focuspoints

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: from

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: happened

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: hierarchy

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: initiate

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: interesting

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: internal

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: javascript

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: language

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: libiconv

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: libraries

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: library

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: localization

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: macros

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: member

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: members

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: metadata

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: miscellaneous

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: mnemonic

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: modified

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: multiple

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: multithreaded

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: mysterious

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: photoshop

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: platforms

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: preliminary

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: priority

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: properties

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: qualifier

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: recognition

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: recognized

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: reentrancy

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: remaining

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: remotetest

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: requested

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: sensitivity

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: standardize

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: successful

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: such

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: tags

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: temperature

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: test

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: the

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: these

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: third

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: this

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: transparent

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: unable

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: underwater

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: uninterpreted

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: using

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: utc - coordinated universal time

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: which

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: with

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>
2022-02-04 08:53:04 +01:00
Kevin Backhouse
891f58aa85
Fix bug in loop. It wasn't iterating over the elements of dateStrings as intended. 2021-12-21 14:22:39 +00:00
Kevin Backhouse
b16cd52b88 Replace sprintf with snprintf. 2021-06-27 10:27:54 +02:00
Kevin Backhouse
2b84f4bd64
fix: zero initialize local variables. (#1743)
* Zero initialize local variables.

* Initialize xmpID_
2021-06-27 08:56:31 +02:00
Luis Díaz Más
f30022d73d
Fix issues detected with PVS-Studio + other little improvements (#1689)
* avoid re-declaration of constant variables

* Replace pthreads critical section with std::mutex

* ci - better naming

* cmake - increase minimum version to 3.11. Use project DESCRIPTION

* fix - do not treat string::find() return type as bool

* remove conditions that were always true

* remove condition that were always false

* Remove EXV_HAVE_GMTIME_R which is not used anymore

* pixelWidth_ was inherited from Exiv2::Image

The width & height variables in the TiffImage class need to be mutable
to be able to change their values on the getters pixelHeight() and
pixelWidth() ... Do not ask me why ...

* Remove superfluous if

* pvs:V766 item with identical key added already

* pvs:V730 not all members were initialized (time)

* pvs:V730 not all members are initialized

* pvs:v668 no point in testing pointer against null after new

* pvs:V1048 variable assigned the same value

* replace c-style dynamic vector with std one

* pvs:547 fakeData is always true

* Remove useless constructor in derived class

* pvs:V690 modern way to disable copy-ctor

* Replace malloc/free with new/delete. No need to check for null

* pvs:V1028 cast operands and not result

* Remove custom MIN/MAX functions

* pvs:V595 pointer used before verified against null

* pvs: index used before being checked

* pvs:V1028 possible overflow. Cast operands

* pvs:v575 potential null pointer passed to other functions

* pvs:V547 deal with always true/false expressions

* pvs:V560 part of conditional expressions always false or true

* pvs:V701 possible break in realloc -> move to std::vector

* Make some classes 'final'

* Replace sprintf with std::to_string()

* fix compilation on windows
2021-06-01 12:39:10 +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
cdbee3c26c clang-tidy: init in member initializer
Found with cppcoreguidelines-prefer-member-initializer

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-19 14:11:42 +02:00
Rosen Penev
f9d394adf0 clang-tidy: run through performance checks
Found with performance*

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-18 14:30:08 +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
4aa5566cf6 clang-tidy: make several member functions const
Found with readability-make-member-function-const

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-15 08:42:04 +02:00
Rosen Penev
fddb035106 clang-tidy: remove pointless const
Found with readability-avoid-const-params-in-decls

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-13 16:02:18 +02:00
Rosen Penev
80595f8468 clang-tidy: remove duplicate public
Found with readability-redundant-access-specifiers

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-13 11:52:02 +02:00
Rosen Penev
15f0a600ed clang-tidy: use default member init
Found with modernize-use-default-member-init

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-11 15:01:26 +02:00
Rosen Penev
bd6a996181 clang-tidy: use using
Found with modernize-use-using

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-09 17:42:51 +02:00
Rosen Penev
8128716287 clang-tidy: use = default
Found with modernize-use-equals-default

Ran through git clang-format

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-09 15:18:50 +02:00
Rosen Penev
4ceb325c8f clang-tidy: range for loop conversions
Found with modernize-loop-convert

Ran through git clang-format.

Also removed several questionable loops and replaced with simpler
algorithms.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-03 14:50:04 +02:00
Luis Díaz Más
83dda6ccd7 Fix warnings related to -Wdeprecated-copy 2021-04-18 18:49:58 +02:00
Luis Díaz Más
0bbaa6eff3 cpp: Replace auto_ptr by unique_ptr 2021-04-15 06:56:11 +02:00
Robin Mills
4a8d365e80 fix_1508_enableBMMF_effort2 2021-04-03 11:03:31 +01:00
Robin Mills
9da2aed5d2 Use the documented 5 line prolog in every sample application. Tidy up sample prologs and header code. 2021-04-02 16:58:20 +01:00
Robin Mills
d632988bbd Massive code prolog cleanup. 2021-03-17 13:34:21 +00:00
Robin Mills
da1b02d644 fix_1268_GPSProcessingMethod 2020-08-29 12:10:50 +01:00
clanmills
8f5b740270 put them back. 2020-05-02 19:05:25 +01:00
clanmills
79b37ec3aa Putting geotag.cpp back into the product (git strikes again) 2020-05-02 18:48:53 +01:00
Robin Mills
cd9ee99567
Delete geotag.cpp 2020-05-02 18:33:10 +01:00
clanmills
d994161e80 Added option -remove to samples/geotag.cpp 2020-05-01 17:40:20 +01:00
clanmills
759ce9fffe fix_1046_sample_geotag Take advantage of fix to #1046 in samples/geotag.cpp 2020-05-01 16:18:01 +01:00
clanmills
13565be3d2 Change for solaris. 2020-04-15 16:53:03 +01:00
Robin Mills
7844b11e4b
[xmpsdk] Add XMP Initialisation/Cleanup code to all main() programs
- update documentation
- Removed redundant calls to Exiv2::XmpParser::terminate() (legacy of our
  discusssion with @tester0077).
- this fixes #976
2019-10-05 10:19:53 +02:00
Luis Díaz Más
113136e134 Replace DEBUG with EXIV2_DEBUG_MESSAGES
Fixes #926
2019-07-12 11:14:35 +02:00
Luis Díaz Más
2d1e1fe6ef Reduce the scope of variables 2018-11-07 23:17:26 +01:00
Luis Díaz Más
dc7eb5008b Add explicit to constructors with 1 argument 2018-11-07 23:17:26 +01:00
Luis Díaz Más
c43d998457 Fix cppcheck issues: passedByValue 2018-10-11 13:40:03 +02:00
Luis Díaz Más
989acd18c7 Fix cppcheck issues: uninitMemberVar & uninitVar 2018-10-11 13:40:03 +02:00