2.12.2021, 9:00 - 11:00: Due to updates GitLab may be unavailable for some minutes between 09:00 and 11:00.

Commit 969f2326 authored by Alessio Netti's avatar Alessio Netti
Browse files

Fixing compiler warnings

parent 577f1656
...@@ -237,7 +237,7 @@ public: ...@@ -237,7 +237,7 @@ public:
virtual void init(boost::asio::io_service& io) final override { virtual void init(boost::asio::io_service& io) final override {
OperatorInterface::init(io); OperatorInterface::init(io);
for(const auto u : _units) for(const auto& u : _units)
u->init(_interval, _queueSize); u->init(_interval, _queueSize);
this->execOnInit(); this->execOnInit();
......
...@@ -180,11 +180,11 @@ public: ...@@ -180,11 +180,11 @@ public:
* @param interval Sampling interval in milliseconds * @param interval Sampling interval in milliseconds
*/ */
void init(unsigned int interval, unsigned int queueSize) override { void init(unsigned int interval, unsigned int queueSize) override {
for(const auto s : _outputs) for(const auto &s : _outputs)
if (!s->isInit()) if (!s->isInit())
s->initSensor(interval, queueSize); s->initSensor(interval, queueSize);
for (const auto &su : _subUnits) for (const auto &su : _subUnits)
for (const auto s : su->getOutputs()) for (const auto &s : su->getOutputs())
if (!s->isInit()) if (!s->isInit())
s->initSensor(interval, queueSize); s->initSensor(interval, queueSize);
} }
......
...@@ -67,8 +67,7 @@ public: ...@@ -67,8 +67,7 @@ public:
*/ */
AnalyticsController(DCDB::SensorConfig *dcdbCfg, DCDB::SensorDataStore *dcdbStore, boost::asio::io_context& io) AnalyticsController(DCDB::SensorConfig *dcdbCfg, DCDB::SensorDataStore *dcdbStore, boost::asio::io_context& io)
: _dcdbCfg(dcdbCfg), : _dcdbCfg(dcdbCfg),
_dcdbStore(dcdbStore), _dcdbStore(dcdbStore) {
_io(io) {
_manager = make_shared<OperatorManager>(io); _manager = make_shared<OperatorManager>(io);
_navigator = nullptr; _navigator = nullptr;
_sensorCache = nullptr; _sensorCache = nullptr;
...@@ -221,8 +220,6 @@ private: ...@@ -221,8 +220,6 @@ private:
// Main management thread for the analytics controller // Main management thread for the analytics controller
boost::thread _mainThread; boost::thread _mainThread;
// IO service for the operators
boost::asio::io_context& _io;
// Underlying thread pool // Underlying thread pool
boost::thread_group _threads; boost::thread_group _threads;
// Dummy task to keep thread pool alive // Dummy task to keep thread pool alive
......
...@@ -34,9 +34,9 @@ ...@@ -34,9 +34,9 @@
using namespace std; using namespace std;
PluginManager::PluginManager(boost::asio::io_context &io, const pluginSettings_t &pluginSettings) PluginManager::PluginManager(boost::asio::io_context &io, const pluginSettings_t &pluginSettings)
: _io(io), : _pluginSettings(pluginSettings),
_pluginSettings(pluginSettings), _cfgFilePath("./"),
_cfgFilePath("./") {} _io(io) {}
PluginManager::~PluginManager() { PluginManager::~PluginManager() {
for (const auto &p : _plugins) for (const auto &p : _plugins)
......
...@@ -207,7 +207,7 @@ class SensorGroupInterface { ...@@ -207,7 +207,7 @@ class SensorGroupInterface {
*/ */
virtual float getMsgRate() { virtual float getMsgRate() {
float val = 0; float val = 0;
for (const auto s: _baseSensors) { for (const auto& s: _baseSensors) {
if(s->getSubsampling() > 0) if(s->getSubsampling() > 0)
val+= 1.0f / (float)s->getSubsampling(); val+= 1.0f / (float)s->getSubsampling();
} }
......
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