[Libreoffice-commits] libvisio.git: 2 commits - src/lib

David Tardon dtardon at redhat.com
Tue Jan 6 07:38:59 PST 2015


 src/lib/VSDMetaData.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 8618e063c1ac0c9fdf60d5b401f8305d8b106d93
Author: David Tardon <dtardon at redhat.com>
Date:   Tue Jan 6 13:49:02 2015 +0100

    why is this constant static?
    
    Change-Id: I4e1129695c2f4fd14c491acfe916853ea33fb64f

diff --git a/src/lib/VSDMetaData.cpp b/src/lib/VSDMetaData.cpp
index d8a8ce1..dac4c97 100644
--- a/src/lib/VSDMetaData.cpp
+++ b/src/lib/VSDMetaData.cpp
@@ -226,7 +226,7 @@ bool libvisio::VSDMetaData::parseTimes(librevenge::RVNGInputStream *input)
   uint64_t modifiedTime = readU64(input);
 
   // modifiedTime is number of 100ns since Jan 1 1601
-  static const uint64_t epoch = uint64_t(116444736UL) * 100;
+  const uint64_t epoch = uint64_t(116444736UL) * 100;
   time_t sec = (modifiedTime / 10000000) - epoch;
   const struct tm *time = localtime(&sec);
   if (time)
commit 949e96a5b47c3a1fcbc49d9f228398c641ab86af
Author: David Tardon <dtardon at redhat.com>
Date:   Tue Jan 6 13:48:06 2015 +0100

    workaround build error on old 32-bit linux systems
    
    "error: integer constant is too large for 'long' type"
    
    Change-Id: Ib2a8987da0bdc03e2b479d8743f8366fde83c203

diff --git a/src/lib/VSDMetaData.cpp b/src/lib/VSDMetaData.cpp
index d1db01e..d8a8ce1 100644
--- a/src/lib/VSDMetaData.cpp
+++ b/src/lib/VSDMetaData.cpp
@@ -226,7 +226,7 @@ bool libvisio::VSDMetaData::parseTimes(librevenge::RVNGInputStream *input)
   uint64_t modifiedTime = readU64(input);
 
   // modifiedTime is number of 100ns since Jan 1 1601
-  static const uint64_t epoch = 11644473600;
+  static const uint64_t epoch = uint64_t(116444736UL) * 100;
   time_t sec = (modifiedTime / 10000000) - epoch;
   const struct tm *time = localtime(&sec);
   if (time)


More information about the Libreoffice-commits mailing list