[Libreoffice-commits] core.git: editeng/source

Michael Stahl mstahl at redhat.com
Thu Apr 2 04:07:47 PDT 2015


 editeng/source/editeng/editobj.cxx |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit 92166c8b4925d68a5a05e82c8fd28b9b244b8bd6
Author: Michael Stahl <mstahl at redhat.com>
Date:   Thu Apr 2 12:53:42 2015 +0200

    editeng: if this should never happen, let's assert that
    
    Change-Id: I803282c9f080013ebee33ce1109612fff509fd6e

diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx
index 9751f32..03b7f04 100644
--- a/editeng/source/editeng/editobj.cxx
+++ b/editeng/source/editeng/editobj.cxx
@@ -970,8 +970,11 @@ void EditTextObjectImpl::GetAllSections( std::vector<editeng::Section>& rAttrs )
 
         itAttr = std::find_if(itAttr, aAttrs.end(), FindByParagraph(nPara));
         if (itAttr == aAttrs.end())
+        {
             // This should never happen. There is a logic error somewhere...
+            assert(false);
             return;
+        }
 
         for (size_t i = 0; i < rC.aAttribs.size(); ++i)
         {
@@ -986,8 +989,11 @@ void EditTextObjectImpl::GetAllSections( std::vector<editeng::Section>& rAttrs )
             // Find the container whose start position matches.
             itCurAttr = std::find_if(itCurAttr, aAttrs.end(), FindBySectionStart(nPara, nStart));
             if (itCurAttr == aAttrs.end())
+            {
                 // This should never happen. There is a logic error somewhere...
+                assert(false);
                 return;
+            }
 
             for (; itCurAttr != aAttrs.end() && itCurAttr->mnParagraph == nPara && itCurAttr->mnEnd <= nEnd; ++itCurAttr)
             {


More information about the Libreoffice-commits mailing list