Skip to content

Commit ff8958e

Browse files
authored
Revert "Bugfix/logging"
1 parent f2a3ff3 commit ff8958e

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

lib/Utilities/src/Logging.cpp

+7-10
Original file line numberDiff line numberDiff line change
@@ -114,17 +114,14 @@ bool Logging::selectSink(const String& name)
114114

115115
while ((MAX_SINKS > index) && (false == status))
116116
{
117-
if (nullptr != m_sinks[index])
117+
if (m_sinks[index]->getName() == name)
118118
{
119-
if (m_sinks[index]->getName() == name)
120-
{
121-
m_selectedSink = m_sinks[index];
122-
status = true;
123-
}
124-
else
125-
{
126-
++index;
127-
}
119+
m_selectedSink = m_sinks[index];
120+
status = true;
121+
}
122+
else
123+
{
124+
++index;
128125
}
129126
}
130127

lib/Utilities/src/Logging.h

+7-1
Original file line numberDiff line numberDiff line change
@@ -359,8 +359,14 @@ class Logging
359359
/**
360360
* Construct Logging.
361361
*/
362-
Logging() : m_currentLogLevel(LOG_LEVEL_INFO), m_sinks{nullptr}, m_selectedSink(nullptr)
362+
Logging() : m_currentLogLevel(LOG_LEVEL_INFO), m_sinks(), m_selectedSink(nullptr)
363363
{
364+
uint8_t index = 0U;
365+
366+
for (index = 0U; index < MAX_SINKS; ++index)
367+
{
368+
m_sinks[index] = nullptr;
369+
}
364370
}
365371

366372
/**

0 commit comments

Comments
 (0)