+ Better support of clang, fix issues discovered by clang
This commit is contained in:
@@ -60,7 +60,7 @@ TaskObjectName::TaskObjectName(App::DocumentObject *pcObject,QWidget *parent)
|
||||
|
||||
QObject::connect(ui->lineEdit_ObjectName,SIGNAL(textChanged (const QString&)),this,SLOT(TextChanged(const QString&)));
|
||||
|
||||
if(pcObject->Label.getValue() != "")
|
||||
if(strcmp(pcObject->Label.getValue(),"") != 0)
|
||||
ui->lineEdit_ObjectName->setText(QString::fromUtf8(pcObject->Label.getValue()));
|
||||
else
|
||||
ui->lineEdit_ObjectName->setText(QString::fromAscii(pcObject->getNameInDocument()));
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "MeshKernel.h"
|
||||
#include "Elements.h"
|
||||
#include <Base/Matrix.h>
|
||||
#include <Base/Vector3D.h>
|
||||
#include <Base/Vector3D.h>
|
||||
#include <climits>
|
||||
|
||||
namespace MeshCore {
|
||||
@@ -382,7 +382,7 @@ inline MeshFacetIterator& MeshFacetIterator::operator = (const MeshFacetIterator
|
||||
_bApply = rpI._bApply;
|
||||
_clTrf = rpI._clTrf;
|
||||
// dirty flat copy of reference
|
||||
memcpy((void*)&_rclMesh, &rpI._rclMesh, sizeof(&_rclMesh));
|
||||
memcpy((void*)&_rclMesh, &rpI._rclMesh, sizeof(MeshKernel*));
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -470,7 +470,7 @@ inline MeshPointIterator& MeshPointIterator::operator = (const MeshPointIterator
|
||||
_bApply = rpI._bApply;
|
||||
_clTrf = rpI._clTrf;
|
||||
// dirty flat copy of reference
|
||||
memcpy((void*)&_rclMesh, &rpI._rclMesh, sizeof(&_rclMesh));
|
||||
memcpy((void*)&_rclMesh, &rpI._rclMesh, sizeof(MeshKernel*));
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
@@ -1031,11 +1031,11 @@ PyObject* MeshPy::splitEdge(PyObject *args)
|
||||
|
||||
const MeshCore::MeshKernel& kernel = getMeshObjectPtr()->getKernel();
|
||||
PY_TRY {
|
||||
if (facet < 0 || facet >= kernel.CountFacets()) {
|
||||
if (facet >= kernel.CountFacets()) {
|
||||
PyErr_SetString(PyExc_IndexError, "Facet index out of range");
|
||||
return NULL;
|
||||
}
|
||||
if (neighbour < 0 || neighbour >= kernel.CountFacets()) {
|
||||
if (neighbour >= kernel.CountFacets()) {
|
||||
PyErr_SetString(PyExc_IndexError, "Facet index out of range");
|
||||
return NULL;
|
||||
}
|
||||
@@ -1072,7 +1072,7 @@ PyObject* MeshPy::splitFacet(PyObject *args)
|
||||
|
||||
const MeshCore::MeshKernel& kernel = getMeshObjectPtr()->getKernel();
|
||||
PY_TRY {
|
||||
if (facet < 0 || facet >= kernel.CountFacets()) {
|
||||
if (facet >= kernel.CountFacets()) {
|
||||
PyErr_SetString(PyExc_IndexError, "Facet index out of range");
|
||||
return NULL;
|
||||
}
|
||||
@@ -1091,11 +1091,11 @@ PyObject* MeshPy::swapEdge(PyObject *args)
|
||||
|
||||
const MeshCore::MeshKernel& kernel = getMeshObjectPtr()->getKernel();
|
||||
PY_TRY {
|
||||
if (facet < 0 || facet >= kernel.CountFacets()) {
|
||||
if (facet >= kernel.CountFacets()) {
|
||||
PyErr_SetString(PyExc_IndexError, "Facet index out of range");
|
||||
return NULL;
|
||||
}
|
||||
if (neighbour < 0 || neighbour >= kernel.CountFacets()) {
|
||||
if (neighbour >= kernel.CountFacets()) {
|
||||
PyErr_SetString(PyExc_IndexError, "Facet index out of range");
|
||||
return NULL;
|
||||
}
|
||||
@@ -1121,11 +1121,11 @@ PyObject* MeshPy::collapseEdge(PyObject *args)
|
||||
|
||||
const MeshCore::MeshKernel& kernel = getMeshObjectPtr()->getKernel();
|
||||
PY_TRY {
|
||||
if (facet < 0 || facet >= kernel.CountFacets()) {
|
||||
if (facet >= kernel.CountFacets()) {
|
||||
PyErr_SetString(PyExc_IndexError, "Facet index out of range");
|
||||
return NULL;
|
||||
}
|
||||
if (neighbour < 0 || neighbour >= kernel.CountFacets()) {
|
||||
if (neighbour >= kernel.CountFacets()) {
|
||||
PyErr_SetString(PyExc_IndexError, "Facet index out of range");
|
||||
return NULL;
|
||||
}
|
||||
@@ -1150,7 +1150,7 @@ PyObject* MeshPy::collapseFacet(PyObject *args)
|
||||
return NULL;
|
||||
|
||||
PY_TRY {
|
||||
if (facet < 0 || facet >= getMeshObjectPtr()->countFacets()) {
|
||||
if (facet >= getMeshObjectPtr()->countFacets()) {
|
||||
PyErr_SetString(PyExc_IndexError, "Facet index out of range");
|
||||
return NULL;
|
||||
}
|
||||
@@ -1173,7 +1173,7 @@ PyObject* MeshPy::insertVertex(PyObject *args)
|
||||
Base::Vector3f v((float)val->x,(float)val->y,(float)val->z);
|
||||
|
||||
PY_TRY {
|
||||
if (facet < 0 || facet >= getMeshObjectPtr()->countFacets()) {
|
||||
if (facet >= getMeshObjectPtr()->countFacets()) {
|
||||
PyErr_SetString(PyExc_IndexError, "Facet index out of range");
|
||||
return NULL;
|
||||
}
|
||||
@@ -1196,7 +1196,7 @@ PyObject* MeshPy::snapVertex(PyObject *args)
|
||||
Base::Vector3f v((float)val->x,(float)val->y,(float)val->z);
|
||||
|
||||
PY_TRY {
|
||||
if (facet < 0 || facet >= getMeshObjectPtr()->countFacets()) {
|
||||
if (facet >= getMeshObjectPtr()->countFacets()) {
|
||||
PyErr_SetString(PyExc_IndexError, "Facet index out of range");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -558,7 +558,7 @@ CmdRaytracingRender::CmdRaytracingRender()
|
||||
void CmdRaytracingRender::activated(int iMsg)
|
||||
{
|
||||
// determining render type
|
||||
const char* renderType;
|
||||
std::string renderType;
|
||||
unsigned int n1 = getSelection().countObjectsOfType(Raytracing::RayProject::getClassTypeId());
|
||||
if (n1 != 1) {
|
||||
unsigned int n2 = getSelection().countObjectsOfType(Raytracing::LuxProject::getClassTypeId());
|
||||
|
||||
Reference in New Issue
Block a user