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

David Tardon dtardon at redhat.com
Tue Jul 21 13:02:26 PDT 2015


 src/lib/VSDParser.cpp |   11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

New commits:
commit 379749ebfba4dfee2b73696a62d1c87121fbfc3b
Author: David Tardon <dtardon at redhat.com>
Date:   Tue Jul 21 21:59:53 2015 +0200

    use shared_ptr here too
    
    Change-Id: I82dbb50a4e75326720f30a2dab8f732e8802b7e4

diff --git a/src/lib/VSDParser.cpp b/src/lib/VSDParser.cpp
index 9a9db15..827ed48 100644
--- a/src/lib/VSDParser.cpp
+++ b/src/lib/VSDParser.cpp
@@ -156,12 +156,9 @@ void libvisio::VSDParser::parseMetaData() try
     return;
   VSDMetaData metaData;
 
-  librevenge::RVNGInputStream *sumaryInfo = m_container->getSubStreamByName("\x05SummaryInformation");
-  if (sumaryInfo)
-  {
-    metaData.parse(sumaryInfo);
-    delete sumaryInfo;
-  }
+  const RVNGInputStreamPtr_t sumaryInfo(m_container->getSubStreamByName("\x05SummaryInformation"));
+  if (bool(sumaryInfo))
+    metaData.parse(sumaryInfo.get());
 
   const RVNGInputStreamPtr_t docSumaryInfo(m_container->getSubStreamByName("\005DocumentSummaryInformation"));
   if (bool(docSumaryInfo))
commit 889311ab33a0c57d5f1801044f8cd8de7d93af53
Author: David Tardon <dtardon at redhat.com>
Date:   Tue Jul 21 22:00:08 2015 +0200

    add const
    
    Change-Id: Ieeef8936cce71f41bc2fbf114bc17739829152e9

diff --git a/src/lib/VSDParser.cpp b/src/lib/VSDParser.cpp
index 9bdb7c6..9a9db15 100644
--- a/src/lib/VSDParser.cpp
+++ b/src/lib/VSDParser.cpp
@@ -163,7 +163,7 @@ void libvisio::VSDParser::parseMetaData() try
     delete sumaryInfo;
   }
 
-  RVNGInputStreamPtr_t docSumaryInfo(m_container->getSubStreamByName("\005DocumentSummaryInformation"));
+  const RVNGInputStreamPtr_t docSumaryInfo(m_container->getSubStreamByName("\005DocumentSummaryInformation"));
   if (bool(docSumaryInfo))
     metaData.parse(docSumaryInfo.get());
 


More information about the Libreoffice-commits mailing list