[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a

Maximiliano Curia maxy at moszumanska.debian.org
Thu Jul 13 17:36:26 UTC 2017


Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=34d27c8

The following commit has been merged in the master branch:
commit 34d27c8b0c12e9cfc71bc03e187786afc151e308
Author: Andreas Huggel <ahuggel at gmx.net>
Date:   Fri Jun 4 02:36:39 2004 +0000

    Fixed MSVC errors and warnings (Steve, sking_3.patch with minor changes)
---
 src/value.cpp | 17 +++++++++--------
 src/value.hpp | 18 +++++++++---------
 2 files changed, 18 insertions(+), 17 deletions(-)

diff --git a/src/value.cpp b/src/value.cpp
index 1748bcf..7f24302 100644
--- a/src/value.cpp
+++ b/src/value.cpp
@@ -20,14 +20,14 @@
  */
 /*
   File:      value.cpp
-  Version:   $Name:  $ $Revision: 1.6 $
+  Version:   $Name:  $ $Revision: 1.7 $
   Author(s): Andreas Huggel (ahu) <ahuggel at gmx.net>
   History:   26-Jan-04, ahu: created
              11-Feb-04, ahu: isolated as a component
  */
 // *****************************************************************************
 #include "rcsid.hpp"
-EXIV2_RCSID("@(#) $Name:  $ $Revision: 1.6 $ $RCSfile: value.cpp,v $")
+EXIV2_RCSID("@(#) $Name:  $ $Revision: 1.7 $ $RCSfile: value.cpp,v $")
 
 // *****************************************************************************
 // included header files
@@ -120,19 +120,19 @@ namespace Exiv2 {
         int tmp;
         value_.clear();
         while (is >> tmp) {
-            value_ += (char)tmp;
+            value_ += static_cast<char>(tmp);
         }
     }
 
     long DataValue::copy(char* buf, ByteOrder byteOrder) const
     {
         // byteOrder not needed
-        return value_.copy(buf, value_.size());
+        return static_cast<long>(value_.copy(buf, value_.size()));
     }
 
     long DataValue::size() const
     {
-        return value_.size();
+        return static_cast<long>(value_.size());
     }
 
     DataValue* DataValue::clone() const
@@ -144,7 +144,8 @@ namespace Exiv2 {
     {
         std::string::size_type end = value_.size();
         for (std::string::size_type i = 0; i != end; ++i) {
-            os << (int)(unsigned char)value_[i] << " ";
+            os << static_cast<int>(static_cast<unsigned char>(value_[i])) 
+               << " ";
         }
         return os;
     }
@@ -172,12 +173,12 @@ namespace Exiv2 {
     long AsciiValue::copy(char* buf, ByteOrder byteOrder) const
     {
         // byteOrder not needed
-        return value_.copy(buf, value_.size());
+        return static_cast<long>(value_.copy(buf, value_.size()));
     }
 
     long AsciiValue::size() const
     {
-        return value_.size();
+        return static_cast<long>(value_.size());
     }
 
     AsciiValue* AsciiValue::clone() const
diff --git a/src/value.hpp b/src/value.hpp
index b3ea9a2..767e9ac 100644
--- a/src/value.hpp
+++ b/src/value.hpp
@@ -21,7 +21,7 @@
 /*!
   @file    value.hpp
   @brief   Value interface and concrete subclasses
-  @version $Name:  $ $Revision: 1.9 $
+  @version $Name:  $ $Revision: 1.10 $
   @author  Andreas Huggel (ahu)
            <a href="mailto:ahuggel at gmx.net">ahuggel at gmx.net</a>
   @date    09-Jan-04, ahu: created
@@ -90,7 +90,7 @@ namespace Exiv2 {
         //! @name Accessors
         //@{
         //! Return the type identifier (Exif data format type).
-        TypeId typeId() const { return TypeId(type_); }
+        TypeId typeId() const { return type_; }
         /*!
           @brief Return the value as a string. Implemented in terms of
                  write(std::ostream& os) const of the concrete class. 
@@ -183,7 +183,7 @@ namespace Exiv2 {
         Value& operator=(const Value& rhs);
 
     private:
-        uint16 type_;                           //!< Type of the data
+        TypeId type_;                           //!< Type of the data
 
     }; // class Value
 
@@ -379,7 +379,7 @@ namespace Exiv2 {
         //! @name Accessors
         //@{
         virtual long copy(char* buf, ByteOrder byteOrder) const;
-        virtual long count() const { return value_.size(); }
+        virtual long count() const { return static_cast<long>(value_.size()); }
         virtual long size() const;
         virtual ValueType<T>* clone() const;
         virtual std::ostream& write(std::ostream& os) const;
@@ -581,7 +581,7 @@ namespace Exiv2 {
     template<typename T>
     long ValueType<T>::size() const
     {
-        return TypeInfo::typeSize(typeId()) * value_.size();
+        return static_cast<long>(TypeInfo::typeSize(typeId()) * value_.size());
     }
 
     template<typename T>
@@ -623,19 +623,19 @@ namespace Exiv2 {
     template<typename T>
     inline float ValueType<T>::toFloat(long n) const
     { 
-        return value_[n]; 
+        return static_cast<float>(value_[n]); 
     }
     // Specialization for rational
     template<>
     inline float ValueType<Rational>::toFloat(long n) const 
     {
-        return (float)value_[n].first / value_[n].second; 
+        return static_cast<float>(value_[n].first / value_[n].second); 
     }
     // Specialization for unsigned rational
     template<>
     inline float ValueType<URational>::toFloat(long n) const 
     {
-        return (float)value_[n].first / value_[n].second; 
+        return static_cast<float>(value_[n].first / value_[n].second); 
     }
     // Default implementation
     template<typename T>
@@ -655,7 +655,7 @@ namespace Exiv2 {
     {
         return Rational(value_[n].first, value_[n].second);
     }
-   
+
 }                                       // namespace Exiv2
 
 #endif                                  // #ifndef VALUE_HPP_

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list