[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:07 UTC 2017


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

The following commit has been merged in the master branch:
commit 9b4f4f84d6429573ef55d08c4a0f605a0a13fb11
Author: Andreas Huggel <ahuggel at gmx.net>
Date:   Mon Jan 18 16:34:16 2010 +0000

    MinGW and MSVC fixes.
---
 samples/werror-test.cpp |  4 +++-
 src/basicio.cpp         | 12 ++++++------
 src/error.hpp           | 12 ++++++------
 src/image.cpp           |  2 +-
 4 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/samples/werror-test.cpp b/samples/werror-test.cpp
index c9ce4af..987ac26 100644
--- a/samples/werror-test.cpp
+++ b/samples/werror-test.cpp
@@ -18,7 +18,9 @@ int main()
         throw Exiv2::WError(-1, L"WARG1", L"WARG2", L"WARG3");
     }
     catch (const Exiv2::WError& e) {
-        std::wcout << "Caught WError '" << e.wwhat() << "'
";
+        std::wstring wmsg = e.wwhat();
+        std::string msg(wmsg.begin(), wmsg.end());
+        std::cout << "Caught WError '" << msg << "'
";
     }
 
     return 0;
diff --git a/src/basicio.cpp b/src/basicio.cpp
index 233df35..cf5d038 100644
--- a/src/basicio.cpp
+++ b/src/basicio.cpp
@@ -502,10 +502,10 @@ namespace Exiv2 {
 #ifdef EXV_UNICODE_PATH
             if (p_->wpMode_ == Impl::wpUnicode) {
                 if (fileExists(wpf) && ::_wremove(wpf) != 0) {
-                    throw WError(2, wpf, strError(), "::_wremove");
+                    throw WError(2, wpf, strError().c_str(), "::_wremove");
                 }
                 if (::_wrename(fileIo->wpath().c_str(), wpf) == -1) {
-                    throw WError(17, fileIo->wpath(), wpf, strError());
+                    throw WError(17, fileIo->wpath(), wpf, strError().c_str());
                 }
                 ::_wremove(fileIo->wpath().c_str());
                 // Check permissions of new file
@@ -998,16 +998,16 @@ namespace Exiv2 {
     {
         FileIo file(wpath);
         if (file.open("rb") != 0) {
-            throw WError(10, wpath, "rb", strError());
+            throw WError(10, wpath, "rb", strError().c_str());
         }
         struct _stat st;
         if (0 != ::_wstat(wpath.c_str(), &st)) {
-            throw WError(2, wpath, strError(), "::_wstat");
+            throw WError(2, wpath, strError().c_str(), "::_wstat");
         }
         DataBuf buf(st.st_size);
         long len = file.read(buf.pData_, buf.size_);
         if (len != buf.size_) {
-            throw WError(2, wpath, strError(), "FileIo::read");
+            throw WError(2, wpath, strError().c_str(), "FileIo::read");
         }
         return buf;
     }
@@ -1027,7 +1027,7 @@ namespace Exiv2 {
     {
         FileIo file(wpath);
         if (file.open("wb") != 0) {
-            throw WError(10, wpath, "wb", strError());
+            throw WError(10, wpath, "wb", strError().c_str());
         }
         return file.write(buf.pData_, buf.size_);
     }
diff --git a/src/error.hpp b/src/error.hpp
index 50b5414..80b659d 100644
--- a/src/error.hpp
+++ b/src/error.hpp
@@ -94,7 +94,7 @@ namespace Exiv2 {
              provided to print errors to a stream.
      */
     template<typename charT>
-    class EXIV2API BasicError : public AnyError {
+    class BasicError : public AnyError {
     public:
         //! @name Creators
         //@{
@@ -102,13 +102,13 @@ namespace Exiv2 {
         explicit BasicError(int code);
         //! Constructor taking an error code and one argument
         template<typename A>
-        EXV_DLLLOCAL BasicError(int code, const A& arg1);
+        BasicError(int code, const A& arg1);
         //! Constructor taking an error code and two arguments
         template<typename A, typename B>
-        EXV_DLLLOCAL BasicError(int code, const A& arg1, const B& arg2);
+        BasicError(int code, const A& arg1, const B& arg2);
         //! Constructor taking an error code and three arguments
         template<typename A, typename B, typename C>
-        EXV_DLLLOCAL BasicError(int code, const A& arg1, const B& arg2, const C& arg3);
+        BasicError(int code, const A& arg1, const B& arg2, const C& arg3);
         //! Virtual destructor. (Needed because of throw())
         virtual ~BasicError() throw();
         //@}
@@ -120,12 +120,12 @@ namespace Exiv2 {
           @brief Return the error message as a C-string. The pointer returned by what()
                  is valid only as long as the BasicError object exists.
          */
-        virtual const char* what() const throw();
+        EXIV2API virtual const char* what() const throw();
         /*!
           @brief Return the error message as a wchar_t-string. The pointer returned by
                  wwhat() is valid only as long as the BasicError object exists.
          */
-        virtual const wchar_t* wwhat() const throw();
+        EXIV2API virtual const wchar_t* wwhat() const throw();
         //@}
 
     private:
diff --git a/src/image.cpp b/src/image.cpp
index 902e2a2..74e7d81 100644
--- a/src/image.cpp
+++ b/src/image.cpp
@@ -448,7 +448,7 @@ namespace Exiv2 {
         std::auto_ptr<FileIo> fileIo(new FileIo(wpath));
         // Create or overwrite the file, then close it
         if (fileIo->open("w+b") != 0) {
-            throw WError(10, wpath, "w+b", strError());
+            throw WError(10, wpath, "w+b", strError().c_str());
         }
         fileIo->close();
         BasicIo::AutoPtr io(fileIo);

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list