[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a
Maximiliano Curia
maxy at moszumanska.debian.org
Thu Jul 13 17:41:49 UTC 2017
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=5d24f66
The following commit has been merged in the master branch:
commit 5d24f66ebdedaccfe5fbc25ddc2b649cce00b43b
Author: Andreas Huggel <ahuggel at gmx.net>
Date: Fri Jul 23 15:32:03 2010 +0000
Added static cast to prevent MSVC warning and comment highlighting non-conforming C++.
---
src/types.cpp | 6 ++++++
src/value.hpp | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/types.cpp b/src/types.cpp
index f3b740b..2a5844b 100644
--- a/src/types.cpp
+++ b/src/types.cpp
@@ -237,6 +237,9 @@ namespace Exiv2 {
float getFloat(const byte* buf, ByteOrder byteOrder)
{
+ // This algorithm assumes that the internal representation of the float
+ // type is the 4-byte IEEE 754 binary32 format, which is common but not
+ // required by the C++ standard.
assert(sizeof(float) == 4);
uint32_t ul = getULong(buf, byteOrder);
return *reinterpret_cast<float*>(&ul);
@@ -318,6 +321,9 @@ namespace Exiv2 {
long f2Data(byte* buf, float f, ByteOrder byteOrder)
{
+ // This algorithm assumes that the internal representation of the float
+ // type is the 4-byte IEEE 754 binary32 format, which is common but not
+ // required by the C++ standard.
assert(sizeof(float) == 4);
uint32_t ul = *reinterpret_cast<uint32_t*>(&f);
return ul2Data(buf, ul, byteOrder);
diff --git a/src/value.hpp b/src/value.hpp
index e8d1248..66f19cb 100644
--- a/src/value.hpp
+++ b/src/value.hpp
@@ -1597,7 +1597,7 @@ namespace Exiv2 {
long ValueType<T>::toLong(long n) const
{
ok_ = true;
- return value_[n];
+ return static_cast<long>(value_[n]);
}
// Specialization for rational
template<>
--
exiv2 packaging
More information about the pkg-kde-commits
mailing list