+ fix warnings with clang
This commit is contained in:
parent
5201223da4
commit
032c893183
|
@ -1450,18 +1450,3 @@ bool DOMPrintErrorHandler::handleError(const DOMError &domError)
|
|||
// Instructs the serializer to continue serialization if possible.
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
//**************************************************************************
|
||||
// XMLCh
|
||||
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
|
||||
static const XMLCh element_person[]= {
|
||||
chLatin_p, chLatin_e, chLatin_r, chLatin_s, chLatin_o, chLatin_n, chNull
|
||||
};
|
||||
|
||||
static const XMLCh element_link[]= {
|
||||
chLatin_l, chLatin_i, chLatin_n, chLatin_k, chNull
|
||||
};
|
||||
|
|
|
@ -1387,6 +1387,9 @@ void messageHandler(QtMsgType type, const char *msg)
|
|||
case QtWarningMsg:
|
||||
Base::Console().Warning("%s\n", msg);
|
||||
break;
|
||||
case QtCriticalMsg:
|
||||
Base::Console().Error("%s\n", msg);
|
||||
break;
|
||||
case QtFatalMsg:
|
||||
Base::Console().Error("%s\n", msg);
|
||||
abort(); // deliberately core dump
|
||||
|
|
|
@ -328,7 +328,6 @@ void PythonStdin::init_type()
|
|||
PythonStdin::PythonStdin(PythonConsole *pc)
|
||||
: pyConsole(pc)
|
||||
{
|
||||
console = getMainWindow()->findChild<PythonConsole*>();
|
||||
}
|
||||
|
||||
PythonStdin::~PythonStdin()
|
||||
|
@ -345,5 +344,5 @@ Py::Object PythonStdin::repr()
|
|||
|
||||
Py::Object PythonStdin::readline(const Py::Tuple& args)
|
||||
{
|
||||
return Py::String( (const char *)console->readline().toAscii() );
|
||||
return Py::String( (const char *)pyConsole->readline().toAscii() );
|
||||
}
|
||||
|
|
|
@ -142,9 +142,6 @@ public:
|
|||
|
||||
Py::Object repr();
|
||||
Py::Object readline(const Py::Tuple&);
|
||||
|
||||
private:
|
||||
PythonConsole* console;
|
||||
};
|
||||
|
||||
} // namespace Gui
|
||||
|
|
|
@ -200,7 +200,6 @@ void SIM::Coin3D::Quarter::SoQTQuarterAdaptor::setCameraType(SoType type)
|
|||
|
||||
|
||||
SoType perspectivetype = SoPerspectiveCamera::getClassTypeId();
|
||||
SoType orthotype = SoOrthographicCamera::getClassTypeId();
|
||||
SbBool oldisperspective = getSoRenderManager()->getCamera()->getTypeId().isDerivedFrom(perspectivetype);
|
||||
SbBool newisperspective = type.isDerivedFrom(perspectivetype);
|
||||
|
||||
|
@ -226,7 +225,6 @@ void SIM::Coin3D::Quarter::SoQTQuarterAdaptor::setCameraType(SoType type)
|
|||
getSoEventManager()->setCamera(newcamera);
|
||||
|
||||
//if the superscene has a camera we need to replace it too
|
||||
SoCamera* camera = NULL;
|
||||
SoSeparator* superscene = (SoSeparator*) getSoRenderManager()->getSceneGraph();
|
||||
SoSearchAction sa;
|
||||
sa.setInterest(SoSearchAction::FIRST);
|
||||
|
|
|
@ -638,7 +638,7 @@ void SoSelectionElementAction::initClass()
|
|||
SO_ACTION_ADD_METHOD(SoPointSet,callDoAction);
|
||||
}
|
||||
|
||||
SoSelectionElementAction::SoSelectionElementAction (Type t) : _type(t), _select(FALSE), _det(0)
|
||||
SoSelectionElementAction::SoSelectionElementAction (Type t) : _type(t), _det(0)
|
||||
{
|
||||
SO_ACTION_CONSTRUCTOR(SoSelectionElementAction);
|
||||
}
|
||||
|
|
|
@ -173,7 +173,6 @@ private:
|
|||
|
||||
private:
|
||||
Type _type;
|
||||
SbBool _select;
|
||||
SbColor _color;
|
||||
const SoDetail* _det;
|
||||
};
|
||||
|
|
|
@ -1201,7 +1201,6 @@ void View3DInventorViewer::setRenderFramebuffer(const SbBool enable)
|
|||
}
|
||||
else if(!this->framebuffer) {
|
||||
const SbViewportRegion vp = this->getSoRenderManager()->getViewportRegion();
|
||||
SbVec2s origin = vp.getViewportOriginPixels();
|
||||
SbVec2s size = vp.getViewportSizePixels();
|
||||
|
||||
static_cast<QGLWidget*>(this->viewport())->makeCurrent();
|
||||
|
@ -2385,7 +2384,7 @@ void View3DInventorViewer::drawArrow(void)
|
|||
}
|
||||
|
||||
// ************************************************************************
|
||||
|
||||
#if 0
|
||||
#define HAND_WITH 24
|
||||
#define HAND_HEIGHT 24
|
||||
#define HAND_HOT_X 9
|
||||
|
@ -2429,7 +2428,7 @@ static unsigned char cross_mask_bitmap[] = {
|
|||
0xff, 0xff, 0xff, 0xff, 0xc0, 0x03, 0xc0, 0x03,
|
||||
0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x03
|
||||
};
|
||||
|
||||
#endif
|
||||
// Set cursor graphics according to mode.
|
||||
void View3DInventorViewer::setCursorRepresentation(int modearg)
|
||||
{
|
||||
|
|
|
@ -273,7 +273,6 @@ PyObject* FemMeshPy::addFace(PyObject *args)
|
|||
|
||||
PyObject *obj;
|
||||
int ElementId=-1;
|
||||
float min_eps = 1.0e-2f;
|
||||
if (PyArg_ParseTuple(args, "O!|i", &PyList_Type, &obj, &ElementId))
|
||||
{
|
||||
Py::List list(obj);
|
||||
|
@ -364,7 +363,6 @@ PyObject* FemMeshPy::addVolume(PyObject *args)
|
|||
|
||||
PyObject *obj;
|
||||
int ElementId=-1;
|
||||
float min_eps = 1.0e-2f;
|
||||
if (PyArg_ParseTuple(args, "O!|i", &PyList_Type, &obj, &ElementId))
|
||||
{
|
||||
Py::List list(obj);
|
||||
|
|
|
@ -202,19 +202,19 @@ App::DocumentObjectExecReturn *FemMeshShapeObject::execute(void)
|
|||
#endif
|
||||
|
||||
|
||||
|
||||
SMESHDS_Mesh* data = const_cast<SMESH_Mesh*>(newMesh.getSMesh())->GetMeshDS();
|
||||
const SMDS_MeshInfo& info = data->GetMeshInfo();
|
||||
int numNode = info.NbNodes();
|
||||
int numTria = info.NbTriangles();
|
||||
int numQuad = info.NbQuadrangles();
|
||||
int numPoly = info.NbPolygons();
|
||||
int numVolu = info.NbVolumes();
|
||||
int numTetr = info.NbTetras();
|
||||
int numHexa = info.NbHexas();
|
||||
int numPyrd = info.NbPyramids();
|
||||
int numPris = info.NbPrisms();
|
||||
int numHedr = info.NbPolyhedrons();
|
||||
|
||||
//SMESHDS_Mesh* data = const_cast<SMESH_Mesh*>(newMesh.getSMesh())->GetMeshDS();
|
||||
//const SMDS_MeshInfo& info = data->GetMeshInfo();
|
||||
//int numNode = info.NbNodes();
|
||||
//int numTria = info.NbTriangles();
|
||||
//int numQuad = info.NbQuadrangles();
|
||||
//int numPoly = info.NbPolygons();
|
||||
//int numVolu = info.NbVolumes();
|
||||
//int numTetr = info.NbTetras();
|
||||
//int numHexa = info.NbHexas();
|
||||
//int numPyrd = info.NbPyramids();
|
||||
//int numPris = info.NbPrisms();
|
||||
//int numHedr = info.NbPolyhedrons();
|
||||
|
||||
// set the value to the object
|
||||
FemMesh.setValue(newMesh);
|
||||
|
|
|
@ -463,7 +463,6 @@ void ViewProviderFemMesh::setHighlightNodes(const std::set<long>& HighlightedNod
|
|||
{
|
||||
|
||||
if(HighlightedNodes.size()){
|
||||
const Fem::PropertyFemMesh* mesh = &(dynamic_cast<Fem::FemMeshObject*>(this->pcObject)->FemMesh);
|
||||
SMESHDS_Mesh* data = const_cast<SMESH_Mesh*>((dynamic_cast<Fem::FemMeshObject*>(this->pcObject)->FemMesh).getValue().getSMesh())->GetMeshDS();
|
||||
|
||||
pcAnoCoords->point.setNum(HighlightedNodes.size());
|
||||
|
@ -713,16 +712,16 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, SoCoordin
|
|||
Base::Console().Log("Start: ViewProviderFEMMeshBuilder::createMesh() =================================\n");
|
||||
|
||||
const SMDS_MeshInfo& info = data->GetMeshInfo();
|
||||
int numNode = info.NbNodes();
|
||||
//int numNode = info.NbNodes();
|
||||
int numTria = info.NbTriangles();
|
||||
int numQuad = info.NbQuadrangles();
|
||||
int numPoly = info.NbPolygons();
|
||||
int numVolu = info.NbVolumes();
|
||||
//int numVolu = info.NbVolumes();
|
||||
int numTetr = info.NbTetras();
|
||||
int numHexa = info.NbHexas();
|
||||
int numPyrd = info.NbPyramids();
|
||||
int numPris = info.NbPrisms();
|
||||
int numHedr = info.NbPolyhedrons();
|
||||
//int numHedr = info.NbPolyhedrons();
|
||||
|
||||
|
||||
bool ShowFaces = false;
|
||||
|
|
|
@ -2064,7 +2064,6 @@ bool MeshOutput::SaveVRML (std::ostream &rstrOut) const
|
|||
return false;
|
||||
|
||||
Base::BoundBox3f clBB = _rclMesh.GetBoundBox();
|
||||
Base::Vector3f clCenter = clBB.CalcCenter();
|
||||
|
||||
Base::SequencerLauncher seq("Saving VRML file...",
|
||||
_rclMesh.CountPoints() + _rclMesh.CountFacets());
|
||||
|
|
|
@ -618,10 +618,6 @@ bool MeshTrimming::CreateFacets(unsigned long ulFacetPos, int iSide, const std::
|
|||
|
||||
MeshGeomFacet clFac;
|
||||
|
||||
Base::Vector3f pnt = myMesh._aclPointArray[facet._aulPoints[1]];
|
||||
Base::Vector3f dir = myMesh._aclPointArray[facet._aulPoints[2]] -
|
||||
myMesh._aclPointArray[facet._aulPoints[1]];
|
||||
|
||||
float fDistEdgeP1 = clP1.DistanceToLineSegment(
|
||||
myMesh._aclPointArray[facet._aulPoints[1]],
|
||||
myMesh._aclPointArray[facet._aulPoints[2]]).Length();
|
||||
|
|
|
@ -127,7 +127,7 @@ void PartExport initPart()
|
|||
}
|
||||
else {
|
||||
Base::Console().Error("Can not inherit Part.OCCError form BaseFreeCADError.\n");
|
||||
PyObject* OCCError = PyErr_NewException("Part.OCCError",
|
||||
OCCError = PyErr_NewException("Part.OCCError",
|
||||
PyExc_RuntimeError, NULL);
|
||||
}
|
||||
Py_INCREF(OCCError);
|
||||
|
|
|
@ -2055,8 +2055,6 @@ TopoDS_Shape TopoShape::mirror(const gp_Ax2& ax2) const
|
|||
{
|
||||
gp_Trsf mat;
|
||||
mat.SetMirror(ax2);
|
||||
TopLoc_Location loc = this->_Shape.Location();
|
||||
gp_Trsf placement = loc.Transformation();
|
||||
BRepBuilderAPI_Transform mkTrf(this->_Shape, mat);
|
||||
return mkTrf.Shape();
|
||||
}
|
||||
|
|
|
@ -27,7 +27,6 @@ set(PartDesignGui_LIBS
|
|||
|
||||
set(PartDesignGui_MOC_HDRS
|
||||
FeaturePickDialog.h
|
||||
ReferenceSelection.h
|
||||
TaskPadParameters.h
|
||||
TaskPocketParameters.h
|
||||
TaskChamferParameters.h
|
||||
|
|
|
@ -127,7 +127,7 @@ void ConstraintView::contextMenuEvent (QContextMenuEvent* event)
|
|||
|
||||
CONTEXT_ITEM("Sketcher_SelectElementsAssociatedWithConstraints","Select Elements","Sketcher_SelectElementsAssociatedWithConstraints",doSelectConstraints,true)
|
||||
|
||||
QAction* sep = menu.addSeparator();
|
||||
menu.addSeparator();
|
||||
|
||||
QAction* change = menu.addAction(tr("Change value"), this, SLOT(modifyCurrentItem()));
|
||||
QVariant v = item ? item->data(Qt::UserRole) : QVariant();
|
||||
|
|
|
@ -58,8 +58,7 @@ protected:
|
|||
|
||||
|
||||
private:
|
||||
QWidget* proxy;
|
||||
|
||||
//QWidget* proxy;
|
||||
};
|
||||
|
||||
} //namespace TaskView
|
||||
|
|
|
@ -157,7 +157,7 @@ struct EditData {
|
|||
CurvesMaterials(0),
|
||||
PointsCoordinate(0),
|
||||
CurvesCoordinate(0),
|
||||
CurveSet(0), EditCurveSet(0), RootCrossSet(0),
|
||||
CurveSet(0), RootCrossSet(0), EditCurveSet(0),
|
||||
PointSet(0), pickStyleAxes(0)
|
||||
{}
|
||||
|
||||
|
@ -809,7 +809,7 @@ bool ViewProviderSketch::mouseButtonPressed(int Button, bool pressed, const SbVe
|
|||
//Create the Context Menu using the Main View Qt Widget
|
||||
QMenu contextMenu(viewer->getGLWidget());
|
||||
Gui::MenuManager::getInstance()->setupContextMenu(geom, contextMenu);
|
||||
QAction *used = contextMenu.exec(QCursor::pos());
|
||||
contextMenu.exec(QCursor::pos());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -870,7 +870,7 @@ bool ViewProviderSketch::mouseButtonPressed(int Button, bool pressed, const SbVe
|
|||
//Create the Context Menu using the Main View Qt Widget
|
||||
QMenu contextMenu(viewer->getGLWidget());
|
||||
Gui::MenuManager::getInstance()->setupContextMenu(geom, contextMenu);
|
||||
QAction *used = contextMenu.exec(QCursor::pos());
|
||||
contextMenu.exec(QCursor::pos());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -1543,10 +1543,8 @@ bool ViewProviderSketch::detectPreselection(const SoPickedPoint *Point,
|
|||
//Base::Console().Log("Point pick\n");
|
||||
SoPath *path = Point->getPath();
|
||||
SoNode *tail = path->getTail();
|
||||
SoNode *tailFather = path->getNode(path->getLength()-2);
|
||||
SoNode *tailFather2 = path->getNode(path->getLength()-3);
|
||||
|
||||
|
||||
// checking for a hit in the points
|
||||
if (tail == edit->PointSet) {
|
||||
const SoDetail *point_detail = Point->getDetail(edit->PointSet);
|
||||
|
@ -1944,7 +1942,7 @@ void ViewProviderSketch::updateColor(void)
|
|||
SbColor *crosscolor = edit->RootCrossMaterials->diffuseColor.startEditing();
|
||||
|
||||
SbVec3f *verts = edit->CurvesCoordinate->point.startEditing();
|
||||
int32_t *index = edit->CurveSet->numVertices.startEditing();
|
||||
//int32_t *index = edit->CurveSet->numVertices.startEditing();
|
||||
|
||||
// colors of the point set
|
||||
if (edit->FullyConstrained)
|
||||
|
@ -1962,11 +1960,11 @@ void ViewProviderSketch::updateColor(void)
|
|||
for (std::set<int>::iterator it=edit->SelPointSet.begin();
|
||||
it != edit->SelPointSet.end(); it++)
|
||||
pcolor[*it] = (*it==(edit->PreselectPoint + 1) && (edit->PreselectPoint != -1))?
|
||||
PreselectSelectedColor:SelectColor;
|
||||
PreselectSelectedColor:SelectColor;
|
||||
|
||||
// colors of the curves
|
||||
int intGeoCount = getSketchObject()->getHighestCurveIndex() + 1;
|
||||
int extGeoCount = getSketchObject()->getExternalGeometryCount();
|
||||
//int intGeoCount = getSketchObject()->getHighestCurveIndex() + 1;
|
||||
//int extGeoCount = getSketchObject()->getExternalGeometryCount();
|
||||
|
||||
float x,y,z;
|
||||
|
||||
|
@ -1974,65 +1972,62 @@ void ViewProviderSketch::updateColor(void)
|
|||
|
||||
for (int i=0; i < CurvNum; i++) {
|
||||
int GeoId = edit->CurvIdToGeoId[i];
|
||||
// CurvId has several vertex a ssociated to 1 material
|
||||
//edit->CurveSet->numVertices => [i] indicates number of vertex for line i.
|
||||
int indexes=(edit->CurveSet->numVertices[i]);
|
||||
|
||||
bool selected=(edit->SelCurvSet.find(GeoId) != edit->SelCurvSet.end());
|
||||
bool preselected=(edit->PreselectCurve == GeoId);
|
||||
|
||||
if (selected && preselected){
|
||||
// CurvId has several vertex a ssociated to 1 material
|
||||
//edit->CurveSet->numVertices => [i] indicates number of vertex for line i.
|
||||
int indexes=(edit->CurveSet->numVertices[i]);
|
||||
|
||||
bool selected=(edit->SelCurvSet.find(GeoId) != edit->SelCurvSet.end());
|
||||
bool preselected=(edit->PreselectCurve == GeoId);
|
||||
|
||||
if (selected && preselected){
|
||||
color[i] = PreselectSelectedColor;
|
||||
for(int k=j; j<k+indexes; j++){
|
||||
verts[j].getValue(x,y,z);
|
||||
verts[j]=SbVec3f(x,y,zHighLine);
|
||||
}
|
||||
}
|
||||
for(int k=j; j<k+indexes; j++){
|
||||
verts[j].getValue(x,y,z);
|
||||
verts[j]=SbVec3f(x,y,zHighLine);
|
||||
}
|
||||
}
|
||||
else if (selected){
|
||||
color[i] = SelectColor;
|
||||
for(int k=j; j<k+indexes; j++){
|
||||
verts[j].getValue(x,y,z);
|
||||
verts[j]=SbVec3f(x,y,zHighLine);
|
||||
}
|
||||
}
|
||||
for(int k=j; j<k+indexes; j++){
|
||||
verts[j].getValue(x,y,z);
|
||||
verts[j]=SbVec3f(x,y,zHighLine);
|
||||
}
|
||||
}
|
||||
else if (preselected){
|
||||
color[i] = PreselectColor;
|
||||
for(int k=j; j<k+indexes; j++){
|
||||
verts[j].getValue(x,y,z);
|
||||
verts[j]=SbVec3f(x,y,zHighLine);
|
||||
}
|
||||
}
|
||||
for(int k=j; j<k+indexes; j++){
|
||||
verts[j].getValue(x,y,z);
|
||||
verts[j]=SbVec3f(x,y,zHighLine);
|
||||
}
|
||||
}
|
||||
else if (GeoId < -2) { // external Geometry
|
||||
color[i] = CurveExternalColor;
|
||||
for(int k=j; j<k+indexes; j++){
|
||||
verts[j].getValue(x,y,z);
|
||||
verts[j]=SbVec3f(x,y,zConstr);
|
||||
}
|
||||
}
|
||||
else if (getSketchObject()->getGeometry(GeoId)->Construction)
|
||||
{
|
||||
for(int k=j; j<k+indexes; j++){
|
||||
verts[j].getValue(x,y,z);
|
||||
verts[j]=SbVec3f(x,y,zConstr);
|
||||
}
|
||||
}
|
||||
else if (getSketchObject()->getGeometry(GeoId)->Construction) {
|
||||
color[i] = CurveDraftColor;
|
||||
for(int k=j; j<k+indexes; j++){
|
||||
verts[j].getValue(x,y,z);
|
||||
verts[j]=SbVec3f(x,y,zLines);
|
||||
}
|
||||
}
|
||||
else if (edit->FullyConstrained)
|
||||
{
|
||||
for(int k=j; j<k+indexes; j++){
|
||||
verts[j].getValue(x,y,z);
|
||||
verts[j]=SbVec3f(x,y,zLines);
|
||||
}
|
||||
}
|
||||
else if (edit->FullyConstrained) {
|
||||
color[i] = FullyConstrainedColor;
|
||||
for(int k=j; j<k+indexes; j++){
|
||||
verts[j].getValue(x,y,z);
|
||||
verts[j]=SbVec3f(x,y,zLines);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for(int k=j; j<k+indexes; j++){
|
||||
verts[j].getValue(x,y,z);
|
||||
verts[j]=SbVec3f(x,y,zLines);
|
||||
}
|
||||
}
|
||||
else {
|
||||
color[i] = CurveColor;
|
||||
for(int k=j; j<k+indexes; j++){
|
||||
verts[j].getValue(x,y,z);
|
||||
verts[j]=SbVec3f(x,y,zLines);
|
||||
}
|
||||
}
|
||||
for(int k=j; j<k+indexes; j++){
|
||||
verts[j].getValue(x,y,z);
|
||||
verts[j]=SbVec3f(x,y,zLines);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// colors of the cross
|
||||
|
|
Loading…
Reference in New Issue
Block a user