fix -Wextra in FreeCADApp
This commit is contained in:
parent
f408f3180b
commit
71df967fdf
|
@ -92,3 +92,59 @@ Base::Placement ComplexGeoData::getPlacement() const
|
|||
mat[2][3]),
|
||||
Base::Rotation(mat));
|
||||
}
|
||||
|
||||
void ComplexGeoData::getLinesFromSubelement(const Segment*,
|
||||
std::vector<Base::Vector3d> &Points,
|
||||
std::vector<Line> &lines) const
|
||||
{
|
||||
(void)Points;
|
||||
(void)lines;
|
||||
}
|
||||
|
||||
void ComplexGeoData::getFacesFromSubelement(const Segment*,
|
||||
std::vector<Base::Vector3d> &Points,
|
||||
std::vector<Base::Vector3d> &PointNormals,
|
||||
std::vector<Facet> &faces) const
|
||||
{
|
||||
(void)Points;
|
||||
(void)PointNormals;
|
||||
(void)faces;
|
||||
}
|
||||
|
||||
Base::Vector3d ComplexGeoData::getPointFromLineIntersection(const Base::Vector3f& base,
|
||||
const Base::Vector3f& dir) const
|
||||
{
|
||||
(void)base;
|
||||
(void)dir;
|
||||
return Base::Vector3d();
|
||||
}
|
||||
|
||||
void ComplexGeoData::getPoints(std::vector<Base::Vector3d> &Points,
|
||||
std::vector<Base::Vector3d> &Normals,
|
||||
float Accuracy, uint16_t flags) const
|
||||
{
|
||||
(void)Points;
|
||||
(void)Normals;
|
||||
(void)Accuracy;
|
||||
(void)flags;
|
||||
}
|
||||
|
||||
void ComplexGeoData::getLines(std::vector<Base::Vector3d> &Points,
|
||||
std::vector<Line> &lines,
|
||||
float Accuracy, uint16_t flags) const
|
||||
{
|
||||
(void)Points;
|
||||
(void)lines;
|
||||
(void)Accuracy;
|
||||
(void)flags;
|
||||
}
|
||||
|
||||
void ComplexGeoData::getFaces(std::vector<Base::Vector3d> &Points,
|
||||
std::vector<Facet> &faces,
|
||||
float Accuracy, uint16_t flags) const
|
||||
{
|
||||
(void)Points;
|
||||
(void)faces;
|
||||
(void)Accuracy;
|
||||
(void)flags;
|
||||
}
|
||||
|
|
|
@ -84,13 +84,13 @@ public:
|
|||
virtual void getLinesFromSubelement(
|
||||
const Segment*,
|
||||
std::vector<Base::Vector3d> &Points,
|
||||
std::vector<Line> &lines) const {}
|
||||
std::vector<Line> &lines) const;
|
||||
/** Get faces from segment */
|
||||
virtual void getFacesFromSubelement(
|
||||
const Segment*,
|
||||
std::vector<Base::Vector3d> &Points,
|
||||
std::vector<Base::Vector3d> &PointNormals,
|
||||
std::vector<Facet> &faces) const {}
|
||||
std::vector<Facet> &faces) const;
|
||||
//@}
|
||||
|
||||
/** @name Placement control */
|
||||
|
@ -133,19 +133,18 @@ public:
|
|||
virtual Base::BoundBox3d getBoundBox(void)const=0;
|
||||
/** Get point from line object intersection */
|
||||
virtual Base::Vector3d getPointFromLineIntersection(
|
||||
const Base::Vector3f& Base,
|
||||
const Base::Vector3f& Dir) const
|
||||
{ return Base::Vector3d(); }
|
||||
const Base::Vector3f& base,
|
||||
const Base::Vector3f& dir) const;
|
||||
/** Get points from object with given accuracy */
|
||||
virtual void getPoints(std::vector<Base::Vector3d> &Points,
|
||||
std::vector<Base::Vector3d> &Normals,
|
||||
float Accuracy, uint16_t flags=0) const {}
|
||||
float Accuracy, uint16_t flags=0) const;
|
||||
/** Get lines from object with given accuracy */
|
||||
virtual void getLines(std::vector<Base::Vector3d> &Points,std::vector<Line> &lines,
|
||||
float Accuracy, uint16_t flags=0) const {}
|
||||
float Accuracy, uint16_t flags=0) const;
|
||||
/** Get faces from object with given accuracy */
|
||||
virtual void getFaces(std::vector<Base::Vector3d> &Points,std::vector<Facet> &faces,
|
||||
float Accuracy, uint16_t flags=0) const {}
|
||||
float Accuracy, uint16_t flags=0) const;
|
||||
//@}
|
||||
|
||||
protected:
|
||||
|
|
|
@ -2317,11 +2317,12 @@ DocumentObject * Document::getObject(const char *Name) const
|
|||
}
|
||||
|
||||
// Note: This method is only used in Tree.cpp slotChangeObject(), see explanation there
|
||||
const bool Document::isIn(const DocumentObject *pFeat) const
|
||||
bool Document::isIn(const DocumentObject *pFeat) const
|
||||
{
|
||||
for (std::map<std::string,DocumentObject*>::const_iterator o = d->objectMap.begin(); o != d->objectMap.end(); o++)
|
||||
for (std::map<std::string,DocumentObject*>::const_iterator o = d->objectMap.begin(); o != d->objectMap.end(); ++o) {
|
||||
if (o->second == pFeat)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -2330,9 +2331,10 @@ const char * Document::getObjectName(DocumentObject *pFeat) const
|
|||
{
|
||||
std::map<std::string,DocumentObject*>::const_iterator pos;
|
||||
|
||||
for (pos = d->objectMap.begin();pos != d->objectMap.end();++pos)
|
||||
for (pos = d->objectMap.begin();pos != d->objectMap.end();++pos) {
|
||||
if (pos->second == pFeat)
|
||||
return pos->first.c_str();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -208,7 +208,7 @@ public:
|
|||
/// Returns a Object of this document
|
||||
DocumentObject *getObject(const char *Name) const;
|
||||
/// Returns true if the DocumentObject is contained in this document
|
||||
const bool isIn(const DocumentObject *pFeat) const;
|
||||
bool isIn(const DocumentObject *pFeat) const;
|
||||
/// Returns a Name of an Object or 0
|
||||
const char *getObjectName(DocumentObject *pFeat) const;
|
||||
/// Returns a Name of an Object or 0
|
||||
|
|
|
@ -241,6 +241,26 @@ void DocumentObserver::detachDocument()
|
|||
}
|
||||
}
|
||||
|
||||
void DocumentObserver::slotCreatedDocument(const App::Document& /*Doc*/)
|
||||
{
|
||||
}
|
||||
|
||||
void DocumentObserver::slotDeletedDocument(const App::Document& /*Doc*/)
|
||||
{
|
||||
}
|
||||
|
||||
void DocumentObserver::slotCreatedObject(const App::DocumentObject& /*Obj*/)
|
||||
{
|
||||
}
|
||||
|
||||
void DocumentObserver::slotDeletedObject(const App::DocumentObject& /*Obj*/)
|
||||
{
|
||||
}
|
||||
|
||||
void DocumentObserver::slotChangedObject(const App::DocumentObject& /*Obj*/, const App::Property& /*Prop*/)
|
||||
{
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
DocumentObjectObserver::DocumentObjectObserver()
|
||||
|
|
|
@ -142,20 +142,15 @@ public:
|
|||
|
||||
private:
|
||||
/** Checks if a new document was created */
|
||||
virtual void slotCreatedDocument(const App::Document& Doc)
|
||||
{}
|
||||
virtual void slotCreatedDocument(const App::Document& Doc);
|
||||
/** Checks if the given document is about to be closed */
|
||||
virtual void slotDeletedDocument(const App::Document& Doc)
|
||||
{}
|
||||
virtual void slotDeletedDocument(const App::Document& Doc);
|
||||
/** Checks if a new object was added. */
|
||||
virtual void slotCreatedObject(const App::DocumentObject& Obj)
|
||||
{}
|
||||
virtual void slotCreatedObject(const App::DocumentObject& Obj);
|
||||
/** Checks if the given object is about to be removed. */
|
||||
virtual void slotDeletedObject(const App::DocumentObject& Obj)
|
||||
{}
|
||||
virtual void slotDeletedObject(const App::DocumentObject& Obj);
|
||||
/** The property of an observed object has changed */
|
||||
virtual void slotChangedObject(const App::DocumentObject& Obj, const App::Property& Prop)
|
||||
{}
|
||||
virtual void slotChangedObject(const App::DocumentObject& Obj, const App::Property& Prop);
|
||||
|
||||
protected:
|
||||
Document* getDocument() const;
|
||||
|
|
|
@ -1619,7 +1619,7 @@ int ConstantExpression::priority() const
|
|||
TYPESYSTEM_SOURCE_ABSTRACT(App::BooleanExpression, App::NumberExpression);
|
||||
|
||||
BooleanExpression::BooleanExpression(const DocumentObject *_owner, bool _value)
|
||||
: NumberExpression(owner, _value ? 1.0 : 0.0)
|
||||
: NumberExpression(_owner, _value ? 1.0 : 0.0)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -1699,6 +1699,7 @@ namespace ExpressionParser {
|
|||
|
||||
void ExpressionParser_yyerror(const char *errorinfo)
|
||||
{
|
||||
(void)errorinfo;
|
||||
}
|
||||
|
||||
/* helper function for tuning number strings with groups in a locale agnostic way... */
|
||||
|
|
|
@ -92,7 +92,7 @@ public:
|
|||
|
||||
virtual int priority() const { return 0; }
|
||||
|
||||
virtual void getDeps(std::set<ObjectIdentifier> &props) const { }
|
||||
virtual void getDeps(std::set<ObjectIdentifier> &/*props*/) const { }
|
||||
|
||||
virtual Expression * simplify() const = 0;
|
||||
|
||||
|
|
|
@ -76,7 +76,8 @@ PyTypeObject FeaturePythonPyT<FeaturePyT>::Type = {
|
|||
0, /*tp_cache */
|
||||
0, /*tp_subclasses */
|
||||
0, /*tp_weaklist */
|
||||
0 /*tp_del */
|
||||
0, /*tp_del */
|
||||
0 /*tp_version_tag */
|
||||
};
|
||||
|
||||
/// Methods structure of FeaturePythonPyT
|
||||
|
|
|
@ -136,15 +136,24 @@ public:
|
|||
const char* type, const char* name=0,
|
||||
const char* group=0, const char* doc=0,
|
||||
short attr=0, bool ro=false, bool hidden=false){
|
||||
(void)type;
|
||||
(void)name;
|
||||
(void)group;
|
||||
(void)doc;
|
||||
(void)attr;
|
||||
(void)ro;
|
||||
(void)hidden;
|
||||
return 0;
|
||||
}
|
||||
virtual bool removeDynamicProperty(const char* name) {
|
||||
(void)name;
|
||||
return false;
|
||||
}
|
||||
virtual std::vector<std::string> getDynamicPropertyNames() const {
|
||||
return std::vector<std::string>();
|
||||
}
|
||||
virtual App::Property *getDynamicPropertyByName(const char* name) const {
|
||||
(void)name;
|
||||
return 0;
|
||||
}
|
||||
virtual void addDynamicProperties(const PropertyContainer*) {
|
||||
|
|
|
@ -1354,7 +1354,7 @@ unsigned int PropertyString::getMemSize (void) const
|
|||
return static_cast<unsigned int>(_cValue.size());
|
||||
}
|
||||
|
||||
void PropertyString::setPathValue(const ObjectIdentifier &path, const boost::any &value)
|
||||
void PropertyString::setPathValue(const ObjectIdentifier &path, const boost::any & /*value*/)
|
||||
{
|
||||
verifyPath(path);
|
||||
}
|
||||
|
|
|
@ -78,7 +78,7 @@ public:
|
|||
virtual unsigned int getMemSize (void) const{return sizeof(long);}
|
||||
|
||||
virtual void setPathValue(const App::ObjectIdentifier & path, const boost::any & value);
|
||||
virtual const boost::any getPathValue(const App::ObjectIdentifier & path) const { return _lValue; }
|
||||
virtual const boost::any getPathValue(const App::ObjectIdentifier & /*path*/) const { return _lValue; }
|
||||
|
||||
protected:
|
||||
long _lValue;
|
||||
|
@ -199,7 +199,7 @@ public:
|
|||
virtual void Paste(const Property &from);
|
||||
|
||||
virtual void setPathValue(const App::ObjectIdentifier & path, const boost::any & value);
|
||||
virtual const boost::any getPathValue(const App::ObjectIdentifier & path) const { return _enum; }
|
||||
virtual const boost::any getPathValue(const App::ObjectIdentifier & /*path*/) const { return _enum; }
|
||||
|
||||
private:
|
||||
Enumeration _enum;
|
||||
|
|
|
@ -118,7 +118,7 @@ void PropertyQuantity::setPyObject(PyObject *value)
|
|||
PropertyFloat::setValue(quant.getValue());
|
||||
}
|
||||
|
||||
void PropertyQuantity::setPathValue(const ObjectIdentifier &path, const boost::any &value)
|
||||
void PropertyQuantity::setPathValue(const ObjectIdentifier & /*path*/, const boost::any &value)
|
||||
{
|
||||
if (value.type() == typeid(double))
|
||||
setValue(boost::any_cast<double>(value));
|
||||
|
@ -128,7 +128,7 @@ void PropertyQuantity::setPathValue(const ObjectIdentifier &path, const boost::a
|
|||
throw bad_cast();
|
||||
}
|
||||
|
||||
const boost::any PropertyQuantity::getPathValue(const ObjectIdentifier &path) const
|
||||
const boost::any PropertyQuantity::getPathValue(const ObjectIdentifier & /*path*/) const
|
||||
{
|
||||
return Quantity(_dValue, _Unit);
|
||||
}
|
||||
|
|
|
@ -243,11 +243,11 @@ TransactionObject::~TransactionObject()
|
|||
delete It->second;
|
||||
}
|
||||
|
||||
void TransactionObject::applyDel(Document &Doc, TransactionalObject *pcObj)
|
||||
void TransactionObject::applyDel(Document & /*Doc*/, TransactionalObject * /*pcObj*/)
|
||||
{
|
||||
}
|
||||
|
||||
void TransactionObject::applyNew(Document &Doc, TransactionalObject *pcObj)
|
||||
void TransactionObject::applyNew(Document & /*Doc*/, TransactionalObject * /*pcObj*/)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user