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

Takeshi Abe tabe at fixedpoint.jp
Mon May 23 04:38:27 UTC 2016


 starmath/source/cursor.cxx |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

New commits:
commit da68f03bb6f7806440c8aba3163b5196f1c98738
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Sat May 21 11:07:15 2016 +0900

    starmath: This should be an assert()
    
    Change-Id: Ia8dd75512168fd0775a8019fc514627a7353b056
    Reviewed-on: https://gerrit.libreoffice.org/25231
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Takeshi Abe <tabe at fixedpoint.jp>

diff --git a/starmath/source/cursor.cxx b/starmath/source/cursor.cxx
index 58a2a63..262d2bd 100644
--- a/starmath/source/cursor.cxx
+++ b/starmath/source/cursor.cxx
@@ -1073,12 +1073,8 @@ void SmCursor::InsertElement(SmFormulaElement element){
             token.aText = "\"%\"";
             pNewNode = new SmMathSymbolNode(token);
         }break;
-        default:
-            SAL_WARN("starmath", "Element unknown!");
     }
-    OSL_ENSURE(pNewNode != nullptr, "No new node was created!");
-    if(!pNewNode)
-        return;
+    assert(pNewNode);
 
     //Prepare the new node
     pNewNode->Prepare(mpDocShell->GetFormat(), *mpDocShell);


More information about the Libreoffice-commits mailing list