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

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


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

New commits:
commit 84aa593e58a2a3cc28e6e36086d0c99f59e42757
Author: David Tardon <dtardon at redhat.com>
Date:   Tue Jan 6 13:44:05 2015 +0100

    why is this variable static?
    
    Change-Id: Ib3108e1f4a0a4caa2df9685ee58a9ea6e7f7634e

diff --git a/src/lib/MSPUBMetaData.cpp b/src/lib/MSPUBMetaData.cpp
index c52fcd7..7e5888e 100644
--- a/src/lib/MSPUBMetaData.cpp
+++ b/src/lib/MSPUBMetaData.cpp
@@ -210,7 +210,7 @@ bool libmspub::MSPUBMetaData::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 4a642d5ab5d9822168ff49580e1349f422ef4481
Author: David Tardon <dtardon at redhat.com>
Date:   Tue Jan 6 13:43:21 2015 +0100

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

diff --git a/src/lib/MSPUBMetaData.cpp b/src/lib/MSPUBMetaData.cpp
index eca048b..c52fcd7 100644
--- a/src/lib/MSPUBMetaData.cpp
+++ b/src/lib/MSPUBMetaData.cpp
@@ -210,7 +210,7 @@ bool libmspub::MSPUBMetaData::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