+ fix flaws found with code analyzer tool
This commit is contained in:
@@ -165,10 +165,10 @@ PyObject* FT2FC(const Py_UNICODE *PyUString,
|
||||
if (!PyList_Size(WireList)) // empty ==> whitespace
|
||||
Base::Console().Log("FT2FC char '0x%04x'/'%d' has no Wires!\n", currchar, currchar);
|
||||
else
|
||||
PyErr = PyList_Append(CharList, WireList);
|
||||
PyList_Append(CharList, WireList);
|
||||
PenPos += (cadv + tracking);
|
||||
prevchar = currchar;
|
||||
}
|
||||
}
|
||||
|
||||
error = FT_Done_FreeType(FTLib);
|
||||
if(error) {
|
||||
@@ -285,7 +285,7 @@ PyObject* getGlyphContours(FT_Face FTFont, UNICHAR currchar, double PenPos, doub
|
||||
if (!ctx.Edges.empty()){
|
||||
ctx.Wires.push_back(edgesToWire(ctx.Edges));
|
||||
}
|
||||
FT_Orientation fontClass = FT_Outline_Get_Orientation(&FTFont->glyph->outline);
|
||||
/*FT_Orientation fontClass =*/ FT_Outline_Get_Orientation(&FTFont->glyph->outline);
|
||||
PyObject* ret = PyList_New(0);
|
||||
|
||||
gp_Vec pointer = gp_Vec(PenPos * Scale,0.0,0.0);
|
||||
@@ -301,7 +301,7 @@ PyObject* getGlyphContours(FT_Face FTFont, UNICHAR currchar, double PenPos, doub
|
||||
ErrorMsg << "FT2FC OCC BRepScale failed \n";
|
||||
throw std::runtime_error(ErrorMsg.str());
|
||||
}
|
||||
PyErr = PyList_Append(ret,new TopoShapeWirePy(new TopoShape(TopoDS::Wire(BRepScale.Shape()))));
|
||||
PyList_Append(ret,new TopoShapeWirePy(new TopoShape(TopoDS::Wire(BRepScale.Shape()))));
|
||||
}
|
||||
return(ret);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user