[Libreoffice-commits] libmspub.git: src/lib
David Tardon
dtardon at redhat.com
Tue Nov 7 13:32:20 UTC 2017
src/lib/MSPUBParser.cpp | 2 +-
src/lib/MSPUBTypes.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
New commits:
commit e0def2a0eed45d6b201c2c45bcfff69a06077253
Author: David Tardon <dtardon at redhat.com>
Date: Tue Nov 7 14:31:51 2017 +0100
use enum value instead of cast
Change-Id: I5d40eefba65534a4290461fb21058965d62c2e48
diff --git a/src/lib/MSPUBParser.cpp b/src/lib/MSPUBParser.cpp
index 7cf0d0b..25a8e73 100644
--- a/src/lib/MSPUBParser.cpp
+++ b/src/lib/MSPUBParser.cpp
@@ -2307,7 +2307,7 @@ bool MSPUBParser::parseContentChunkReference(librevenge::RVNGInputStream *input,
{
//input should be at block.dataOffset + 4 , that is, at the beginning of the list of sub-blocks
MSPUB_DEBUG_MSG(("Parsing chunk reference 0x%x\n", m_lastSeenSeqNum));
- auto type = (MSPUBContentChunkType)0;
+ MSPUBContentChunkType type = UNKNOWN_CHUNK;
unsigned long offset = 0;
unsigned parentSeqNum = 0;
bool seenType = false;
diff --git a/src/lib/MSPUBTypes.h b/src/lib/MSPUBTypes.h
index 175b42a..f3257e1 100644
--- a/src/lib/MSPUBTypes.h
+++ b/src/lib/MSPUBTypes.h
@@ -65,7 +65,7 @@ struct MSPUBBlockInfo
struct ContentChunkReference
{
- ContentChunkReference() : type((MSPUBContentChunkType)0), offset(0), end(0), seqNum(0), parentSeqNum(0) { }
+ ContentChunkReference() : type(UNKNOWN_CHUNK), offset(0), end(0), seqNum(0), parentSeqNum(0) { }
ContentChunkReference(MSPUBContentChunkType t, unsigned long o, unsigned long e, unsigned sn, unsigned psn) :
type(t), offset(o), end(e), seqNum(sn), parentSeqNum(psn) {}
MSPUBContentChunkType type;
More information about the Libreoffice-commits
mailing list