[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a
Maximiliano Curia
maxy at moszumanska.debian.org
Thu Jul 13 17:42:30 UTC 2017
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=ebfb513
The following commit has been merged in the master branch:
commit ebfb513a210b1e9d33ced3804bcfcc39a99e85d8
Author: Robin Mills <robin at clanmills.com>
Date: Wed Jun 29 01:02:04 2011 +0000
Removing the casts which were regrettably added with SVN: 2525.
---
src/iptc.cpp | 2 +-
src/jp2image.cpp | 6 +++---
src/jpgimage.cpp | 2 +-
src/orfimage.cpp | 2 +-
src/pngchunk.cpp | 4 ++--
src/psdimage.cpp | 2 +-
src/tiffimage.cpp | 2 +-
src/types.cpp | 11 ++---------
src/types.hpp | 9 +--------
9 files changed, 13 insertions(+), 27 deletions(-)
diff --git a/src/iptc.cpp b/src/iptc.cpp
index 22dc234..99b019f 100644
--- a/src/iptc.cpp
+++ b/src/iptc.cpp
@@ -506,7 +506,7 @@ namespace Exiv2 {
uint16_t sizeOfSize = 4 | 0x8000;
us2Data(pWrite, sizeOfSize, bigEndian);
pWrite += 2;
- ul2Data(pWrite, (uint32_t) dataSize, bigEndian);
+ ul2Data(pWrite, dataSize, bigEndian);
pWrite += 4;
}
else {
diff --git a/src/jp2image.cpp b/src/jp2image.cpp
index 6e1558e..44b9f32 100644
--- a/src/jp2image.cpp
+++ b/src/jp2image.cpp
@@ -488,7 +488,7 @@ namespace Exiv2
memcpy(rawExif.pData_ + sizeof(ExifHeader), &blob[0], blob.size());
DataBuf boxData(8 + 16 + rawExif.size_);
- ul2Data(boxDataSize, (uint32_t) boxData.size_, Exiv2::bigEndian);
+ ul2Data(boxDataSize, boxData.size_, Exiv2::bigEndian);
ul2Data(boxUUIDtype, kJp2BoxTypeUuid, Exiv2::bigEndian);
memcpy(boxData.pData_, boxDataSize, 4);
memcpy(boxData.pData_ + 4, boxUUIDtype, 4);
@@ -511,7 +511,7 @@ namespace Exiv2
if (rawIptc.size_ > 0)
{
DataBuf boxData(8 + 16 + rawIptc.size_);
- ul2Data(boxDataSize, (uint32_t) boxData.size_, Exiv2::bigEndian);
+ ul2Data(boxDataSize, boxData.size_, Exiv2::bigEndian);
ul2Data(boxUUIDtype, kJp2BoxTypeUuid, Exiv2::bigEndian);
memcpy(boxData.pData_, boxDataSize, 4);
memcpy(boxData.pData_ + 4, boxUUIDtype, 4);
@@ -541,7 +541,7 @@ namespace Exiv2
DataBuf xmp(reinterpret_cast<const byte*>(xmpPacket_.data()), static_cast<long>(xmpPacket_.size()));
DataBuf boxData(8 + 16 + xmp.size_);
- ul2Data(boxDataSize, (uint32_t)boxData.size_, Exiv2::bigEndian);
+ ul2Data(boxDataSize, boxData.size_, Exiv2::bigEndian);
ul2Data(boxUUIDtype, kJp2BoxTypeUuid, Exiv2::bigEndian);
memcpy(boxData.pData_, boxDataSize, 4);
memcpy(boxData.pData_ + 4, boxUUIDtype, 4);
diff --git a/src/jpgimage.cpp b/src/jpgimage.cpp
index 14d37c3..1306370 100644
--- a/src/jpgimage.cpp
+++ b/src/jpgimage.cpp
@@ -230,7 +230,7 @@ namespace Exiv2 {
us2Data(tmpBuf + 4, iptc_, bigEndian);
tmpBuf[6] = 0;
tmpBuf[7] = 0;
- ul2Data(tmpBuf + 8, (uint32_t)rawIptc.size_, bigEndian);
+ ul2Data(tmpBuf + 8, rawIptc.size_, bigEndian);
append(psBlob, tmpBuf, 12);
append(psBlob, rawIptc.pData_, rawIptc.size_);
// Data is padded to be even (but not included in size)
diff --git a/src/orfimage.cpp b/src/orfimage.cpp
index 5b1becb..e53c02e 100644
--- a/src/orfimage.cpp
+++ b/src/orfimage.cpp
@@ -281,7 +281,7 @@ namespace Exiv2 {
break;
}
us2Data(buf.pData_ + 2, sig_, byteOrder());
- ul2Data(buf.pData_ + 4, (uint32_t) 0x00000008, byteOrder());
+ ul2Data(buf.pData_ + 4, 0x00000008, byteOrder());
return buf;
}
diff --git a/src/pngchunk.cpp b/src/pngchunk.cpp
index caf4250..561dc1a 100644
--- a/src/pngchunk.cpp
+++ b/src/pngchunk.cpp
@@ -541,7 +541,7 @@ namespace Exiv2 {
uLong tmp = crc32(0L, Z_NULL, 0);
tmp = crc32(tmp, (const Bytef*)crcData.data(), static_cast<uInt>(crcData.size()));
byte crc[4];
- ul2Data(crc, (uint32_t) tmp, bigEndian);
+ ul2Data(crc, tmp, bigEndian);
// Assemble the chunk
return std::string((const char*)length, 4) + chunkType + chunkData + std::string((const char*)crc, 4);
@@ -578,7 +578,7 @@ namespace Exiv2 {
uLong tmp = crc32(0L, Z_NULL, 0);
tmp = crc32(tmp, (const Bytef*)crcData.data(), static_cast<uInt>(crcData.size()));
byte crc[4];
- ul2Data(crc, (uint32_t)tmp, bigEndian);
+ ul2Data(crc, tmp, bigEndian);
// Assemble the chunk
return std::string((const char*)length, 4) + chunkType + chunkData + std::string((const char*)crc, 4);
diff --git a/src/psdimage.cpp b/src/psdimage.cpp
index 67d81ae..db41c55 100644
--- a/src/psdimage.cpp
+++ b/src/psdimage.cpp
@@ -582,7 +582,7 @@ namespace Exiv2 {
if (out.write(buf, 2) != 2) throw Error(21);
us2Data(buf, 0, bigEndian); // NULL resource name
if (out.write(buf, 2) != 2) throw Error(21);
- ul2Data(buf, (uint32_t)rawIptc.size_, bigEndian);
+ ul2Data(buf, rawIptc.size_, bigEndian);
if (out.write(buf, 4) != 4) throw Error(21);
// Write encoded Iptc data
if (out.write(rawIptc.pData_, rawIptc.size_) != rawIptc.size_) throw Error(21);
diff --git a/src/tiffimage.cpp b/src/tiffimage.cpp
index 48c2e83..594b017 100644
--- a/src/tiffimage.cpp
+++ b/src/tiffimage.cpp
@@ -1973,7 +1973,7 @@ namespace Exiv2 {
break;
}
us2Data(buf.pData_ + 2, tag_, byteOrder_);
- ul2Data(buf.pData_ + 4, (uint32_t)0x00000008, byteOrder_);
+ ul2Data(buf.pData_ + 4, 0x00000008, byteOrder_);
return buf;
}
diff --git a/src/types.cpp b/src/types.cpp
index 10dd3ba..2016b81 100644
--- a/src/types.cpp
+++ b/src/types.cpp
@@ -330,8 +330,9 @@ namespace Exiv2 {
return 2;
}
- long ul2Data(byte* buf, uint32_t l, ByteOrder byteOrder)
+ long ul2Data(byte* buf, size_t s, ByteOrder byteOrder)
{
+ uint32_t l = (uint32_t) s; // downcast for 64 bit architecture
if (byteOrder == littleEndian) {
buf[0] = (byte) (l & 0x000000ff);
buf[1] = (byte)((l & 0x0000ff00) >> 8);
@@ -347,14 +348,6 @@ namespace Exiv2 {
return 4;
}
-#ifdef _WIN64
- long ul2Data(byte* buf, size_t s, ByteOrder byteOrder)
- {
- uint32_t l = (uint32_t) s;
- return ul2Data(buf,l,byteOrder);
- }
-#endif
-
long ur2Data(byte* buf, URational l, ByteOrder byteOrder)
{
long o = ul2Data(buf, l.first, byteOrder);
diff --git a/src/types.hpp b/src/types.hpp
index 16d5377..2ece2ab 100644
--- a/src/types.hpp
+++ b/src/types.hpp
@@ -293,14 +293,7 @@ namespace Exiv2 {
@brief Convert an unsigned long to data, write the data to the buffer,
return number of bytes written.
*/
- EXIV2API long ul2Data(byte* buf, uint32_t l, ByteOrder byteOrder);
-#ifdef _WIN64
- /*!
- @brief Convert an unsigned long to data, write the data to the buffer,
- return number of bytes written.
- */
- EXIV2API long ul2Data(byte* buf, size_t l, ByteOrder byteOrder);
-#endif
+ EXIV2API long ul2Data(byte* buf, size_t s, ByteOrder byteOrder);
/*!
@brief Convert an unsigned rational to data, write the data to the buffer,
return number of bytes written.
--
exiv2 packaging
More information about the pkg-kde-commits
mailing list