fix -Wextra in Points

This commit is contained in:
wmayer
2016-09-21 21:10:41 +02:00
parent 1e6dcabefc
commit dec6897ec9
5 changed files with 17 additions and 6 deletions

View File

@@ -52,12 +52,12 @@ std::vector<const char*> PointKernel::getElementTypes(void) const
return temp;
}
unsigned long PointKernel::countSubElements(const char* Type) const
unsigned long PointKernel::countSubElements(const char* /*Type*/) const
{
return 0;
}
Data::Segment* PointKernel::getSubElement(const char* Type, unsigned long n) const
Data::Segment* PointKernel::getSubElement(const char* /*Type*/, unsigned long /*n*/) const
{
//unsigned long i = 1;
@@ -194,8 +194,8 @@ void PointKernel::save(std::ostream& out) const
}
void PointKernel::getPoints(std::vector<Base::Vector3d> &Points,
std::vector<Base::Vector3d> &Normals,
float Accuracy, uint16_t flags) const
std::vector<Base::Vector3d> &/*Normals*/,
float /*Accuracy*/, uint16_t /*flags*/) const
{
unsigned long ctpoints = _Points.size();
Points.reserve(ctpoints);

View File

@@ -629,7 +629,7 @@ unsigned long PointsGrid::GetElements (unsigned long ulX, unsigned long ulY, uns
return 0;
}
void PointsGrid::AddPoint (const Base::Vector3d &rclPt, unsigned long ulPtIndex, float fEpsilon)
void PointsGrid::AddPoint (const Base::Vector3d &rclPt, unsigned long ulPtIndex, float /*fEpsilon*/)
{
unsigned long ulX, ulY, ulZ;
Pos(Base::Vector3d(rclPt.x, rclPt.y, rclPt.z), ulX, ulY, ulZ);

View File

@@ -125,6 +125,7 @@ void PropertyPointKernel::Restore(Base::XMLReader &reader)
void PropertyPointKernel::SaveDocFile (Base::Writer &writer) const
{
// does nothing
(void)writer;
}
void PropertyPointKernel::RestoreDocFile(Base::Reader &reader)

View File

@@ -70,6 +70,8 @@ CmdPointsImport::CmdPointsImport()
void CmdPointsImport::activated(int iMsg)
{
Q_UNUSED(iMsg);
QString fn = Gui::FileDialog::getOpenFileName(Gui::getMainWindow(),
QString::null, QString(), QString::fromLatin1("%1 (*.asc);;%2 (*.*)")
.arg(QObject::tr("Ascii Points")).arg(QObject::tr("All Files")));
@@ -117,6 +119,8 @@ CmdPointsExport::CmdPointsExport()
void CmdPointsExport::activated(int iMsg)
{
Q_UNUSED(iMsg);
std::vector<App::DocumentObject*> points = getSelection().getObjectsOfType(Points::Feature::getClassTypeId());
for (std::vector<App::DocumentObject*>::const_iterator it = points.begin(); it != points.end(); ++it) {
QString fn = Gui::FileDialog::getSaveFileName(Gui::getMainWindow(),
@@ -156,6 +160,8 @@ CmdPointsTransform::CmdPointsTransform()
void CmdPointsTransform::activated(int iMsg)
{
Q_UNUSED(iMsg);
// This is a test command to transform a point cloud directly written in C++ (not Python)
Base::Placement trans;
trans.setRotation(Base::Rotation(Base::Vector3d(0.0, 0.0, 1.0), 1.570796));
@@ -190,6 +196,8 @@ CmdPointsConvert::CmdPointsConvert()
void CmdPointsConvert::activated(int iMsg)
{
Q_UNUSED(iMsg);
bool ok;
double tol = QInputDialog::getDouble(Gui::getMainWindow(), QObject::tr("Distance"),
QObject::tr("Enter maximum distance:"), 0.1, 0.05, 10.0, 2, &ok);
@@ -277,6 +285,8 @@ CmdPointsPolyCut::CmdPointsPolyCut()
void CmdPointsPolyCut::activated(int iMsg)
{
Q_UNUSED(iMsg);
std::vector<App::DocumentObject*> docObj = Gui::Selection().getObjectsOfType(Points::Feature::getClassTypeId());
for (std::vector<App::DocumentObject*>::iterator it = docObj.begin(); it != docObj.end(); ++it) {
if (it == docObj.begin()) {

View File

@@ -297,7 +297,7 @@ void ViewProviderPoints::unsetEdit(int)
{
}
void ViewProviderPoints::clipPointsCallback(void * ud, SoEventCallback * n)
void ViewProviderPoints::clipPointsCallback(void *, SoEventCallback * n)
{
// When this callback function is invoked we must in either case leave the edit mode
Gui::View3DInventorViewer* view = reinterpret_cast<Gui::View3DInventorViewer*>(n->getUserData());