diff options
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/performancetimer.cpp | 3 | ||||
-rw-r--r-- | src/util/rotary.cpp | 10 | ||||
-rw-r--r-- | src/util/sample.cpp | 3 | ||||
-rw-r--r-- | src/util/screensaver.cpp | 3 | ||||
-rw-r--r-- | src/util/threadcputimer.cpp | 3 | ||||
-rw-r--r-- | src/util/xml.cpp | 6 |
6 files changed, 18 insertions, 10 deletions
diff --git a/src/util/performancetimer.cpp b/src/util/performancetimer.cpp index 139192e751..8f2769cf0c 100644 --- a/src/util/performancetimer.cpp +++ b/src/util/performancetimer.cpp @@ -162,8 +162,9 @@ static int monotonicClockAvailable = false; static void unixCheckClockType() { #if (_POSIX_MONOTONIC_CLOCK-0 == 0) - if (is_likely(load_acquire(monotonicClockChecked))) + if (is_likely(load_acquire(monotonicClockChecked))) { return; + } # if defined(_SC_MONOTONIC_CLOCK) // detect if the system support monotonic timers diff --git a/src/util/rotary.cpp b/src/util/rotary.cpp index d344aba006..bb0fc74761 100644 --- a/src/util/rotary.cpp +++ b/src/util/rotary.cpp @@ -11,8 +11,9 @@ Rotary::Rotary() m_iCalibrationCount(0) { m_iFilterLength = kiRotaryFilterMaxLen; m_pFilter = new double[m_iFilterLength]; - for (int i=0; i<m_iFilterLength; ++i) + for (int i = 0; i < m_iFilterLength; ++i) { m_pFilter[i] = 0.; + } } Rotary::~Rotary() { @@ -82,12 +83,13 @@ double Rotary::getCalibration() { } void Rotary::setFilterLength(int i) { - if (i>kiRotaryFilterMaxLen) + if (i > kiRotaryFilterMaxLen) { m_iFilterLength = kiRotaryFilterMaxLen; - else if (i<1) + } else if (i < 1) { m_iFilterLength = 1; - else + } else { m_iFilterLength = i; + } } int Rotary::getFilterLength() { diff --git a/src/util/sample.cpp b/src/util/sample.cpp index f560294a39..3fbf46e088 100644 --- a/src/util/sample.cpp +++ b/src/util/sample.cpp @@ -109,8 +109,9 @@ void SampleUtil::free(CSAMPLE* pBuffer) { // static void SampleUtil::applyGain(CSAMPLE* pBuffer, CSAMPLE_GAIN gain, SINT numSamples) { - if (gain == CSAMPLE_GAIN_ONE) + if (gain == CSAMPLE_GAIN_ONE) { return; + } if (gain == CSAMPLE_GAIN_ZERO) { clear(pBuffer, numSamples); return; diff --git a/src/util/screensaver.cpp b/src/util/screensaver.cpp index 022312f207..2c1cc970f3 100644 --- a/src/util/screensaver.cpp +++ b/src/util/screensaver.cpp @@ -170,8 +170,9 @@ void ScreenSaverHelper::triggerUserActivity() { const char* name = ":0.0"; Display *display; - if (getenv("DISPLAY")) + if (getenv("DISPLAY")) { name=getenv("DISPLAY"); + } display=XOpenDisplay(name); XResetScreenSaver(display); XCloseDisplay(display); diff --git a/src/util/threadcputimer.cpp b/src/util/threadcputimer.cpp index 13f6280316..31979c63b7 100644 --- a/src/util/threadcputimer.cpp +++ b/src/util/threadcputimer.cpp @@ -40,8 +40,9 @@ static int threadCpuTimeAvailable = false; static void unixCheckClockType() { #if (_POSIX_THREAD_CPUTIME-0 == 0) - if (is_likely(load_acquire(threadCpuTimeChecked))) + if (is_likely(load_acquire(threadCpuTimeChecked))) { return; + } # if defined(_SC_THREAD_CPUTIME) // detect if the system support monotonic timers diff --git a/src/util/xml.cpp b/src/util/xml.cpp index 98f8b51062..78f081c46d 100644 --- a/src/util/xml.cpp +++ b/src/util/xml.cpp @@ -23,8 +23,9 @@ QDomNode XmlParse::selectNode(const QDomNode& nodeHeader, const QString& sNode) { QDomNode node = nodeHeader.firstChild(); while (!node.isNull()) { - if (node.nodeName() == sNode) + if (node.nodeName() == sNode) { return node; + } node = node.nextSibling(); } return node; @@ -49,8 +50,9 @@ QDomElement XmlParse::selectElement(const QDomNode& nodeHeader, QString XmlParse::selectNodeQString(const QDomNode& nodeHeader, const QString& sNode) { QDomNode node = selectNode(nodeHeader, sNode); - if (!node.isNull()) + if (!node.isNull()) { return node.toElement().text(); + } return QString(""); } |