Commit 6b8e9447 authored by Nghia Truong's avatar Nghia Truong
Browse files

STYLE: Clean-up and fix warnings

parent 20d01aed
......@@ -20,8 +20,8 @@
=========================================================================*/
#pragma once
#include <atomic>
#include <atomic>
#include "imstkMath.h"
namespace imstk
......
......@@ -37,6 +37,7 @@ void ThreadManager::setThreadPoolSize(const size_t nThreads)
{
s_tbbGlobalControl.reset();
}
s_tbbGlobalControl = std::unique_ptr<tbb::global_control>(
new tbb::global_control(tbb::global_control::max_allowed_parallelism,
nThreads));
......
......@@ -48,7 +48,7 @@ enum class ModuleStatus
///
class Module
{
using CallbackFunction = std::function<void(Module* module)>;
using CallbackFunction = std::function<void (Module* module)>;
public:
///
......@@ -62,7 +62,7 @@ public:
///
/// \brief Destructor
///
~Module() = default;
virtual ~Module() = default;
///
/// \brief Start the module
......
......@@ -127,7 +127,7 @@ public:
///
/// \brief
///
virtual void updatePhysicsGeometry(){};
virtual void updatePhysicsGeometry(){}
///
/// \brief Set the time step size
......
......@@ -48,29 +48,29 @@ public:
/// \brief Initialize the pbd state
///
void initialize(const size_t numNodes, const bool (&options)[3]);
void initialize(const std::shared_ptr<PointSet>& m, const bool(&options)[3]);
void initialize(const std::shared_ptr<PointSet>& m, const bool (&options)[3]);
///
/// \brief Get/Set nodal position given the index
///
void setVertexPosition(const size_t& idx, const Vec3d& pos) { m_pos.at(idx) = pos; };
Vec3d& getVertexPosition(const size_t& idx) { return m_pos.at(idx); };
void setVertexPosition(const size_t& idx, const Vec3d& pos) { m_pos.at(idx) = pos; }
Vec3d& getVertexPosition(const size_t& idx) { return m_pos.at(idx); }
///
/// \brief Returns the vector of current nodal positions
///
StdVectorOfVec3d& getPositions() { return m_pos; };
void setPositions(const StdVectorOfVec3d& p) { m_pos = p; };
StdVectorOfVec3d& getPositions() { return m_pos; }
void setPositions(const StdVectorOfVec3d& p) { m_pos = p; }
///
/// \brief Returns the vector of current nodal velocities
///
StdVectorOfVec3d& getVelocities() { return m_vel; };
StdVectorOfVec3d& getVelocities() { return m_vel; }
///
/// \brief Returns the vector of current nodal accelerations
///
StdVectorOfVec3d& getAccelerations() { return m_acc; };
StdVectorOfVec3d& getAccelerations() { return m_acc; }
///
/// \brief Set the state to a given one
......@@ -84,4 +84,4 @@ private:
};
} // imstk
#endif // imstkPbdState_h
\ No newline at end of file
#endif // imstkPbdState_h
......@@ -41,7 +41,7 @@ public:
/// \brief Constructor
///
VectorizedState() = default;
VectorizedState(const size_t size){ initialize(size); };
VectorizedState(const size_t size){ initialize(size); }
//ProblemState(const Vectord& u, const Vectord& v, const Vectord& a);
///
......
......@@ -48,7 +48,7 @@ public:
///
/// \brief Destructor
///
~TetraTriangleMap() = default;
virtual ~TetraTriangleMap() = default;
///
/// \brief Compute the tetra-triangle mesh map
......
......@@ -51,7 +51,7 @@ public:
///
/// \brief
///
virtual ~CollidingObject() = default;
virtual ~CollidingObject() override = default;
///
/// \brief
......@@ -86,7 +86,7 @@ public:
///
/// \brief Initialize the scene object
///
virtual bool initialize()
virtual bool initialize() override
{
if (SceneObject::initialize())
{
......
......@@ -83,8 +83,7 @@ SceneObject::getVisualModels()
return m_visualModels;
}
const size_t
SceneObject::getNumVisualModels()
size_t SceneObject::getNumVisualModels()
{
return m_visualModels.size();
}
......
......@@ -97,7 +97,7 @@ public:
///
/// \brief Get number of visual models
///
const size_t getNumVisualModels();
size_t getNumVisualModels();
///
/// \brief Get the master geometry
......@@ -107,17 +107,17 @@ public:
///
/// \brief
///
virtual void updateGeometries() {};
virtual void updateGeometries() {}
///
/// \brief Initialize the scene object
///
virtual bool initialize(){ return true; };
virtual bool initialize(){ return true; }
///
/// \brief
///
virtual void reset(){};
virtual void reset(){}
protected:
///
......
......@@ -49,7 +49,7 @@ public:
///
/// \brief Destructor
///
~SceneManager() = default;
virtual ~SceneManager() override = default;
///
/// \brief Get the scene that the scene manager is managing
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment