src: clazy compiler warnings

get rid of most clazy warnings (https://github.com/KDE/clazy)
* range loop use refs
* qcolor ctor with ints
* missing Q_OBJECT macro
* use .constfirst instead of .first

enabled ccache for unix systems for fasterr recompiling
* if ccache is in path we use it now
This commit is contained in:
Andreas Stallinger
2017-08-10 09:45:55 +02:00
parent bb5c1d49b6
commit 37ead804bf
97 changed files with 339 additions and 344 deletions
@@ -176,7 +176,7 @@ std::set<FilePath> InterprocessIndexingStatusManager::getIndexedFiles()
return result;
}
for (auto file : *files)
for (auto& file : *files)
{
result.insert(FilePath(file.c_str()));
}
@@ -198,7 +198,7 @@ void InterprocessIndexingStatusManager::addIndexedFiles(std::set<FilePath> fileP
}
std::set<std::string> oldFiles;
for (auto indexedFile : *indexedFiles)
for (auto& indexedFile : *indexedFiles)
{
oldFiles.insert(indexedFile.c_str());
}
@@ -213,7 +213,7 @@ void InterprocessIndexingStatusManager::addIndexedFiles(std::set<FilePath> fileP
}
size_t estimatedSize = 262144;
for (auto newFile : newFiles)
for (auto& newFile : newFiles)
{
estimatedSize += sizeof(std::string) + newFile.size();
}