Cleanup: remove updateHash() function

updateHash() and hashPicture() did the same thing, with the exception
that hashPicture() marked the dive list as changed if a hash changed.
This seems like a good idea in any case, therefore always use
hashPicture().

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2018-02-17 12:21:13 +01:00 committed by Lubomir I. Ivanov
parent f8835751dc
commit a0d02bacf3
2 changed files with 1 additions and 10 deletions

View file

@ -1185,15 +1185,6 @@ QString fileFromHash(const char *hash)
return localFilenameOf[QByteArray::fromHex(hash)];
}
// This needs to operate on a copy of picture as it frees it after finishing!
void updateHash(struct picture *picture) {
if (!picture)
return;
QByteArray hash = hashFile(fileFromHash(picture->hash));
learnHash(picture, hash);
picture_free(picture);
}
// This needs to operate on a copy of picture as it frees it after finishing!
void hashPicture(struct picture *picture)
{