fixed performance issues, found by selfcheck with cppcheck.
This commit is contained in:
parent
ff1de4c896
commit
8308fb72e3
|
@ -122,7 +122,7 @@ unsigned int CppCheck::check()
|
|||
std::list<std::string> configurations;
|
||||
std::string filedata = "";
|
||||
|
||||
if (_fileContents.size() > 0 && _fileContents.find(_filenames[c]) != _fileContents.end())
|
||||
if ( (!_fileContents.empty()) && (_fileContents.find(_filenames[c]) != _fileContents.end()))
|
||||
{
|
||||
// File content was given as a string
|
||||
std::istringstream iss(_fileContents[ _filenames[c] ]);
|
||||
|
|
|
@ -41,7 +41,7 @@ private:
|
|||
std::vector<std::string> relative, absolute;
|
||||
FileLister::recursiveAddFiles2(relative, absolute, ".");
|
||||
|
||||
ASSERT(relative.size() != 0);
|
||||
ASSERT(!relative.empty());
|
||||
ASSERT_EQUALS((int)relative.size(), (int)absolute.size());
|
||||
|
||||
for (std::vector<std::string>::const_iterator r = relative.begin(), r_end = relative.end(),
|
||||
|
|
Loading…
Reference in New Issue