Coverity #1321244 fixed 89/18289/3
Dhruv Khattar [Wed, 22 Jun 2016 09:02:14 +0000 (14:02 +0530)]
Change-Id: Ie44d85ca8bb0d6c0b93a025e156e29fa70455df2

scilab/modules/ast/src/cpp/operations/types_divide.cpp

index 7ca79dc..9143d39 100644 (file)
@@ -339,7 +339,6 @@ int RDividePolyByDouble(Polynom* _pPoly, Double* _pDouble, Polynom** _pPolyOut)
                 iRightDivisionComplexMatrixByComplexMatrix(pC->get(), pC->getImg(), 1, &dblDivR, &dblDivI, 0, pC->get(), pC->getImg(), 1, pC->getSize());
             }
         }
-
         return 0;
     }
 
@@ -376,50 +375,7 @@ int RDividePolyByDouble(Polynom* _pPoly, Double* _pDouble, Polynom** _pPolyOut)
         (*_pPolyOut)->setComplex(true);
     }
 
-    if (bScalar2)
-    {
-        //[p] * cst
-        for (int i = 0 ; i < _pPoly->getSize() ; i++)
-        {
-            SinglePoly *pPolyIn   = _pPoly->get(i);
-            double* pRealIn  = pPolyIn->get();
-            double* pImgIn  = pPolyIn->getImg();
-
-            SinglePoly *pPolyOut  = (*_pPolyOut)->get(i);
-            double* pRealOut = pPolyOut->get();
-            double* pImgOut  = pPolyOut->getImg();
-
-            if (bComplex1 == false && bComplex2 == false)
-            {
-                iRightDivisionRealMatrixByRealMatrix(
-                    pRealIn, 1,
-                    _pDouble->getReal(), 0,
-                    pRealOut, 1, pPolyOut->getSize());
-            }
-            else if (bComplex1 == false && bComplex2 == true)
-            {
-                iRightDivisionRealMatrixByComplexMatrix(
-                    pRealIn, 1,
-                    _pDouble->getReal(), _pDouble->getImg(), 0,
-                    pRealOut, pImgOut, 1, pPolyOut->getSize());
-            }
-            else if (bComplex1 == true && bComplex2 == false)
-            {
-                iRightDivisionComplexMatrixByRealMatrix(
-                    pRealIn, pImgIn, 1,
-                    _pDouble->getReal(), 0,
-                    pRealOut, pImgOut, 1, pPolyOut->getSize());
-            }
-            else if (bComplex1 == true && bComplex2 == true)
-            {
-                iRightDivisionComplexMatrixByComplexMatrix(
-                    pRealIn, pImgIn, 1,
-                    _pDouble->getReal(), _pDouble->getImg(), 0,
-                    pRealOut, pImgOut, 1, pPolyOut->getSize());
-            }
-        }
-    }
-    else if (bScalar1)
+    if (bScalar1)
     {
         for (int i = 0 ; i < pTemp->get(0)->getSize() ; i++)
         {