Improved: Switched to stricter code formatter (Uncrustify) for better consistency across all source files.

This commit is contained in:
jthedering committed 2015-11-23 21:17:34 +00:00
1 parent a1be4cc70f
commit 57e8158efd
202 files changed
+4595 -4284

No files matched your search

+25 -25
View File
@@ -1,20 +1,20 @@
/*
This file is part of EqualizerAPO, a system-wide equalizer.
Copyright (C) 2014 Jonas Thedering
This file is part of EqualizerAPO, a system-wide equalizer.
Copyright (C) 2014 Jonas Thedering
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "stdafx.h"
@@ -48,7 +48,7 @@ vector<IFilter*> DeviceFilterFactory::startOfConfiguration()
vector<IFilter*> DeviceFilterFactory::createFilter(const wstring& configPath, wstring& command, wstring& parameters)
{
if(command == L"Device")
if (command == L"Device")
{
bool matches = matchDevice(deviceString, parameters);
@@ -56,7 +56,7 @@ vector<IFilter*> DeviceFilterFactory::createFilter(const wstring& configPath, ws
deviceMatches = matches;
}
if(!deviceMatches)
if (!deviceMatches)
// skip line for further factories
command = L"";
@@ -75,21 +75,21 @@ bool DeviceFilterFactory::matchDevice(const std::wstring& deviceString, const st
{
wstring value = StringHelper::trim(pattern) + L";";
vector<vector<wstring>> fullList;
vector<vector<wstring> > fullList;
vector<wstring> currentList;
wstring currentWord;
for(unsigned i=0; i<value.length(); i++)
for (unsigned i = 0; i < value.length(); i++)
{
wchar_t c = value[i];
if(c == L' ' || c == L';')
if (c == L' ' || c == L';')
{
if(currentWord.length() > 0)
if (currentWord.length() > 0)
{
currentList.push_back(currentWord);
currentWord.clear();
}
if(c == L';' && currentList.size() > 0)
if (c == L';' && currentList.size() > 0)
{
fullList.push_back(currentList);
currentList.clear();
@@ -103,24 +103,24 @@ bool DeviceFilterFactory::matchDevice(const std::wstring& deviceString, const st
bool matches = false;
for(unsigned i=0; i<fullList.size(); i++)
for (unsigned i = 0; i < fullList.size(); i++)
{
matches = true;
if(fullList[i].size() == 1 && StringHelper::toLowerCase(fullList[i][0]) == L"all")
if (fullList[i].size() == 1 && StringHelper::toLowerCase(fullList[i][0]) == L"all")
break;
for(unsigned j=0; j<fullList[i].size(); j++)
for (unsigned j = 0; j < fullList[i].size(); j++)
{
wstring word = StringHelper::toLowerCase(fullList[i][j]);
if(StringHelper::toLowerCase(deviceString).find(word) == -1)
if (StringHelper::toLowerCase(deviceString).find(word) == -1)
{
matches = false;
break;
}
}
if(matches)
if (matches)
break;
}