cppcheck fixes

This commit is contained in:
Ingo Weyrich
2019-08-08 13:41:14 +02:00
parent d765c06cf4
commit 4bf4b818c0
9 changed files with 103 additions and 129 deletions

View File

@@ -261,10 +261,10 @@ bool ProfileStore::parseDir (Glib::ustring& realPath, Glib::ustring& virtualPath
return fileFound;
}
int ProfileStore::findFolderId (const Glib::ustring &path)
int ProfileStore::findFolderId (const Glib::ustring &path) const
{
// initialization must have been done when calling this
for (std::vector<Glib::ustring>::iterator i = folders.begin(); i != folders.end(); ++i) {
for (std::vector<Glib::ustring>::const_iterator i = folders.begin(); i != folders.end(); ++i) {
if (*i == path) {
return i - folders.begin();
}
@@ -454,7 +454,7 @@ const PartialProfile* ProfileStore::getDefaultPartialProfile (bool isRaw)
return pProf;
}
const Glib::ustring ProfileStore::getPathFromId (int folderId)
const Glib::ustring ProfileStore::getPathFromId (int folderId) const
{
// initialization must have been done when calling this
return folders.at (folderId);