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


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

The following commit has been merged in the master branch:
commit 2ce6c3dd007971085963c1d30b79693e59373dd9
Author: Andreas Huggel <ahuggel at gmx.net>
Date:   Mon Jan 25 15:23:06 2010 +0000

    Compile WError stuff only if Unicode paths are configured.
---
 samples/werror-test.cpp |  2 ++
 src/error.cpp           |  4 +++-
 src/error.hpp           | 12 ++++++++++--
 3 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/samples/werror-test.cpp b/samples/werror-test.cpp
index 987ac26..99f3e25 100644
--- a/samples/werror-test.cpp
+++ b/samples/werror-test.cpp
@@ -14,6 +14,7 @@ int main()
         std::cout << "Caught Error '" << e.what() << "'
";
     }
 
+#ifdef EXV_UNICODE_PATH
     try {
         throw Exiv2::WError(-1, L"WARG1", L"WARG2", L"WARG3");
     }
@@ -22,6 +23,7 @@ int main()
         std::string msg(wmsg.begin(), wmsg.end());
         std::cout << "Caught WError '" << msg << "'
";
     }
+#endif
 
     return 0;
 }
diff --git a/src/error.cpp b/src/error.cpp
index 4017df3..0298313 100644
--- a/src/error.cpp
+++ b/src/error.cpp
@@ -148,6 +148,7 @@ namespace Exiv2 {
 #endif
     }
 
+#ifdef EXV_UNICODE_PATH
     template<>
     void BasicError<wchar_t>::setMsg()
     {
@@ -177,8 +178,9 @@ namespace Exiv2 {
             }
         }
         wmsg_ = wmsg;
-//        msg_ = ws2s(wmsg);
+        msg_ = ws2s(wmsg);
     }
+#endif
 
     const char* errMsg(int code)
     {
diff --git a/src/error.hpp b/src/error.hpp
index ccd992a..15644b0 100644
--- a/src/error.hpp
+++ b/src/error.hpp
@@ -121,11 +121,13 @@ namespace Exiv2 {
                  is valid only as long as the BasicError object exists.
          */
         EXV_DLLLOCAL virtual const char* what() const throw();
+#ifdef EXV_UNICODE_PATH
         /*!
           @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.
          */
         EXV_DLLLOCAL virtual const wchar_t* wwhat() const throw();
+#endif
         //@}
 
     private:
@@ -141,12 +143,17 @@ namespace Exiv2 {
         std::basic_string<charT> arg2_;         //!< Second argument
         std::basic_string<charT> arg3_;         //!< Third argument
         std::string              msg_;          //!< Complete error message
+#ifdef EXV_UNICODE_PATH
 	std::wstring             wmsg_;         //!< Complete error message as a wide string
-
+#endif
     }; // class BasicError
 
+    //! Error class used for exceptions (std::string based)
     typedef BasicError<char> Error;
+#ifdef EXV_UNICODE_PATH
+    //! Error class used for exceptions (std::wstring based)
     typedef BasicError<wchar_t> WError;
+#endif
 
 // *****************************************************************************
 // free functions, template and inline definitions
@@ -204,12 +211,13 @@ namespace Exiv2 {
         return msg_.c_str();
     }
 
+#ifdef EXV_UNICODE_PATH
     template<typename charT>
     const wchar_t* BasicError<charT>::wwhat() const throw()
     {
         return wmsg_.c_str();
     }
-
+#endif
 #ifdef _MSC_VER
 # pragma warning( default : 4275 )
 #endif

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list