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:
@@ -22,7 +22,7 @@ void InterprocessIndexerCommandManager::setIndexerCommands(
|
||||
const unsigned int overestimationMultiplier = 2;
|
||||
|
||||
size_t estimatedSize = 1048576; /* 1 MB */
|
||||
for (auto command : indexerCommands)
|
||||
for (auto& command : indexerCommands)
|
||||
{
|
||||
estimatedSize += command->getByteSize() + sizeof(SharedIndexerCommand);
|
||||
}
|
||||
@@ -49,7 +49,7 @@ void InterprocessIndexerCommandManager::setIndexerCommands(
|
||||
return;
|
||||
}
|
||||
|
||||
for (auto command : indexerCommands)
|
||||
for (auto& command : indexerCommands)
|
||||
{
|
||||
queue->push_back(SharedIndexerCommand(access.getAllocator()));
|
||||
SharedIndexerCommand& sharedCommand = queue->back();
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user