Skip to content
Snippets Groups Projects
Commit d76ea984 authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

Reduce number of warnings in MeshLib when using clang.

parent 529f732f
No related branches found
No related tags found
No related merge requests found
...@@ -64,7 +64,7 @@ public: ...@@ -64,7 +64,7 @@ public:
void setNode(unsigned idx, Node* node); void setNode(unsigned idx, Node* node);
/// Get array of element nodes. /// Get array of element nodes.
Node* const* getNodes() const { return _nodes; }; Node* const* getNodes() const { return _nodes; }
/// Get dimension of the mesh element. /// Get dimension of the mesh element.
virtual unsigned getDimension() const = 0; virtual unsigned getDimension() const = 0;
...@@ -129,9 +129,8 @@ public: ...@@ -129,9 +129,8 @@ public:
/** /**
* Get the value for this element. The value can be used to store a link * Get the value for this element. The value can be used to store a link
* to external information (for instance an index of a field) like material groups. * to external information (for instance an index of a field) like material groups.
* @return
*/ */
unsigned getValue() const { return _value; }; unsigned getValue() const { return _value; }
/** /**
* Set the index value for external information. * Set the index value for external information.
......
...@@ -33,7 +33,7 @@ struct Location ...@@ -33,7 +33,7 @@ struct Location
std::size_t item_id; std::size_t item_id;
Location(std::size_t meshid, MeshItemType itemtype, std::size_t itemid) Location(std::size_t meshid, MeshItemType itemtype, std::size_t itemid)
: mesh_id(meshid), item_type(itemtype), item_id(itemid){}; : mesh_id(meshid), item_type(itemtype), item_id(itemid){}
}; };
/// Lexicographic order of Location. /// Lexicographic order of Location.
......
...@@ -52,40 +52,40 @@ public: ...@@ -52,40 +52,40 @@ public:
void addElement(Element* elem); void addElement(Element* elem);
/// Returns the dimension of the mesh (determined by the maximum dimension over all elements). /// Returns the dimension of the mesh (determined by the maximum dimension over all elements).
unsigned getDimension() const { return _mesh_dimension; }; unsigned getDimension() const { return _mesh_dimension; }
/// Get the minimum edge length over all elements of the mesh. /// Get the minimum edge length over all elements of the mesh.
double getMinEdgeLength() { return _edge_length[0]; }; double getMinEdgeLength() { return _edge_length[0]; }
/// Get the maximum edge length over all elements of the mesh. /// Get the maximum edge length over all elements of the mesh.
double getMaxEdgeLength() { return _edge_length[1]; }; double getMaxEdgeLength() { return _edge_length[1]; }
/// Get the node with the given index. /// Get the node with the given index.
const Node* getNode(unsigned idx) const { return _nodes[idx]; }; const Node* getNode(unsigned idx) const { return _nodes[idx]; }
/// Get the element with the given index. /// Get the element with the given index.
const Element* getElement(unsigned idx) const { return _elements[idx]; }; const Element* getElement(unsigned idx) const { return _elements[idx]; }
/// Get the minimum edge length for the mesh /// Get the minimum edge length for the mesh
double getMinEdgeLength() const { return _edge_length[0]; }; double getMinEdgeLength() const { return _edge_length[0]; }
/// Get the maximum edge length for the mesh /// Get the maximum edge length for the mesh
double getMaxEdgeLength() const { return _edge_length[1]; }; double getMaxEdgeLength() const { return _edge_length[1]; }
/// Get the number of elements /// Get the number of elements
std::size_t getNElements() const { return _elements.size(); }; std::size_t getNElements() const { return _elements.size(); }
/// Get the number of nodes /// Get the number of nodes
std::size_t getNNodes() const { return _nodes.size(); }; std::size_t getNNodes() const { return _nodes.size(); }
/// Get name of the mesh. /// Get name of the mesh.
const std::string getName() const { return _name; }; const std::string getName() const { return _name; }
/// Get the nodes-vector for the mesh. /// Get the nodes-vector for the mesh.
std::vector<Node*> const& getNodes() const { return _nodes; }; std::vector<Node*> const& getNodes() const { return _nodes; }
/// Get the element-vector for the mesh. /// Get the element-vector for the mesh.
std::vector<Element*> const& getElements() const { return _elements; }; std::vector<Element*> const& getElements() const { return _elements; }
/// Resets the IDs of all mesh-nodes to their position in the node vector /// Resets the IDs of all mesh-nodes to their position in the node vector
void resetNodeIDs(); void resetNodeIDs();
...@@ -98,7 +98,7 @@ public: ...@@ -98,7 +98,7 @@ public:
void setEdgeLengthRange(const double &min_length, const double &max_length); void setEdgeLengthRange(const double &min_length, const double &max_length);
/// Changes the name of the mesh. /// Changes the name of the mesh.
void setName(const std::string &name) { this->_name = name; }; void setName(const std::string &name) { this->_name = name; }
/// Get id of the mesh /// Get id of the mesh
std::size_t getID() const {return _id; } std::size_t getID() const {return _id; }
......
...@@ -60,16 +60,16 @@ public: ...@@ -60,16 +60,16 @@ public:
Node(const Node &node); Node(const Node &node);
/// Return all the nodes connected to this one /// Return all the nodes connected to this one
const std::vector<MeshLib::Node*>& getConnectedNodes() const { return _connected_nodes; }; const std::vector<MeshLib::Node*>& getConnectedNodes() const { return _connected_nodes; }
/// Get an element the node is part of. /// Get an element the node is part of.
const Element* getElement(unsigned idx) const { return _elements[idx]; }; const Element* getElement(unsigned idx) const { return _elements[idx]; }
/// Get all elements the node is part of. /// Get all elements the node is part of.
const std::vector<Element*>& getElements() const { return _elements; }; const std::vector<Element*>& getElements() const { return _elements; }
/// Get number of elements the node is part of. /// Get number of elements the node is part of.
std::size_t getNElements() const { return _elements.size(); }; std::size_t getNElements() const { return _elements.size(); }
/// Destructor /// Destructor
virtual ~Node(); virtual ~Node();
...@@ -79,12 +79,12 @@ protected: ...@@ -79,12 +79,12 @@ protected:
* Add an element the node is part of. * Add an element the node is part of.
* This method is called by Mesh::addElement(Element*), see friend definition. * This method is called by Mesh::addElement(Element*), see friend definition.
*/ */
void addElement(Element* elem) { _elements.push_back(elem); }; void addElement(Element* elem) { _elements.push_back(elem); }
void setConnectedNodes(std::vector<Node*> &connected_nodes) { this->_connected_nodes = connected_nodes; }; void setConnectedNodes(std::vector<Node*> &connected_nodes) { this->_connected_nodes = connected_nodes; }
/// Sets the ID of a node to the given value. /// Sets the ID of a node to the given value.
void setID(unsigned id) { this->_id = id; }; void setID(unsigned id) { this->_id = id; }
/// Update coordinates of a node. /// Update coordinates of a node.
/// This method automatically also updates the areas/volumes of all connected elements. /// This method automatically also updates the areas/volumes of all connected elements.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment