aports/testing/gpscorrelate/exiv2-0.28.patch

88 lines
3.4 KiB
Diff

Patch-Source: https://gitlab.archlinux.org/archlinux/packaging/packages/gpscorrelate/-/blob/9d84f5a7ec16d73970ab89924a106652348b7063/exiv2-0.28.patch
--
diff --git a/exif-gps.cpp b/exif-gps.cpp
index d464d62..8c91cf4 100644
--- a/exif-gps.cpp
+++ b/exif-gps.cpp
@@ -97,7 +97,7 @@ int main(int argc, char* argv[])
char* ReadExifDate(const char* File, int* IncludesGPS)
{
// Open and read the file.
- Exiv2::Image::AutoPtr Image;
+ Exiv2::Image::UniquePtr Image;
try {
Image = Exiv2::ImageFactory::open(File);
@@ -154,7 +154,7 @@ char* ReadExifData(const char* File, double* Lat, double* Long, double* Elev, in
// much more data than the last, specifically
// for display purposes. For the GUI version.
// Open and read the file.
- Exiv2::Image::AutoPtr Image;
+ Exiv2::Image::UniquePtr Image;
try {
Image = Exiv2::ImageFactory::open(File);
@@ -273,7 +273,7 @@ char* ReadExifData(const char* File, double* Lat, double* Long, double* Elev, in
// Is the altitude below sea level? If so, negate the value.
GPSData = ExifRead["Exif.GPSInfo.GPSAltitudeRef"];
- if (GPSData.count() >= 1 && GPSData.toLong() == 1)
+ if (GPSData.count() >= 1 && GPSData.toUint32() == 1)
{
// Negate the elevation.
*Elev = -*Elev;
@@ -292,7 +292,7 @@ char* ReadGPSTimestamp(const char* File, char* DateStamp, char* TimeStamp, int*
// much more data than the last, specifically
// for display purposes. For the GUI version.
// Open and read the file.
- Exiv2::Image::AutoPtr Image;
+ Exiv2::Image::UniquePtr Image;
try {
Image = Exiv2::ImageFactory::open(File);
@@ -463,7 +463,7 @@ int WriteGPSData(const char* File, const struct GPSPoint* Point,
struct utimbuf utb;
if (NoChangeMtime)
stat(File, &statbuf);
- Exiv2::Image::AutoPtr Image;
+ Exiv2::Image::UniquePtr Image;
try {
Image = Exiv2::ImageFactory::open(File);
@@ -493,7 +493,7 @@ int WriteGPSData(const char* File, const struct GPSPoint* Point,
// Do all the easy constant ones first.
// GPSVersionID tag: standard says it should be four bytes: 02 02 00 00
// (and, must be present).
- Exiv2::Value::AutoPtr Value = Exiv2::Value::create(Exiv2::unsignedByte);
+ Exiv2::Value::UniquePtr Value = Exiv2::Value::create(Exiv2::unsignedByte);
Value->read("2 2 0 0");
replace(ExifToWrite, Exiv2::ExifKey("Exif.GPSInfo.GPSVersionID"), Value.get());
// Datum: the datum of the measured data. The default is WGS-84.
@@ -643,7 +643,7 @@ int WriteFixedDatestamp(const char* File, time_t Time)
struct utimbuf utb;
stat(File, &statbuf);
- Exiv2::Image::AutoPtr Image;
+ Exiv2::Image::UniquePtr Image;
try {
Image = Exiv2::ImageFactory::open(File);
@@ -672,7 +672,7 @@ int WriteFixedDatestamp(const char* File, time_t Time)
ExifToWrite.erase(ExifToWrite.findKey(Exiv2::ExifKey("Exif.GPSInfo.GPSDateStamp")));
ExifToWrite["Exif.GPSInfo.GPSDateStamp"] = ScratchBuf;
- Exiv2::Value::AutoPtr Value = Exiv2::Value::create(Exiv2::unsignedRational);
+ Exiv2::Value::UniquePtr Value = Exiv2::Value::create(Exiv2::unsignedRational);
snprintf(ScratchBuf, sizeof(ScratchBuf), "%d/1 %d/1 %d/1",
TimeStamp.tm_hour, TimeStamp.tm_min,
TimeStamp.tm_sec);
@@ -705,7 +705,7 @@ int RemoveGPSExif(const char* File, int NoChangeMtime, int NoWriteExif)
stat(File, &statbuf);
// Open the file and start reading.
- Exiv2::Image::AutoPtr Image;
+ Exiv2::Image::UniquePtr Image;
try {
Image = Exiv2::ImageFactory::open(File);