mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Many filenames are const strings
So we can use string constants for those Signed-off-by: Robert C. Helling <helling@atdotde.de>
This commit is contained in:
parent
508387b1e1
commit
dbd99f706e
4 changed files with 11 additions and 11 deletions
|
@ -352,7 +352,7 @@ extern "C" xsltStylesheetPtr get_stylesheet(const char *name)
|
|||
}
|
||||
|
||||
|
||||
extern "C" timestamp_t picture_get_timestamp(char *filename)
|
||||
extern "C" timestamp_t picture_get_timestamp(const char *filename)
|
||||
{
|
||||
easyexif::EXIFInfo exif;
|
||||
memblock mem;
|
||||
|
@ -999,7 +999,7 @@ QMutex hashOfMutex;
|
|||
QHash<QByteArray, QString> localFilenameOf;
|
||||
QHash <QString, QImage > thumbnailCache;
|
||||
|
||||
extern "C" char * hashstring(char * filename)
|
||||
extern "C" char * hashstring(const char *filename)
|
||||
{
|
||||
QMutexLocker locker(&hashOfMutex);
|
||||
return hashOf[QString(filename)].toHex().data();
|
||||
|
@ -1084,7 +1084,7 @@ void learnHash(struct picture *picture, QByteArray hash)
|
|||
picture->hash = strdup(hash.toHex());
|
||||
}
|
||||
|
||||
bool haveHash(QString &filename)
|
||||
bool haveHash(const QString &filename)
|
||||
{
|
||||
QMutexLocker locker(&hashOfMutex);
|
||||
return hashOf.contains(filename);
|
||||
|
@ -1100,7 +1100,7 @@ QString localFilePath(const QString originalFilename)
|
|||
return originalFilename;
|
||||
}
|
||||
|
||||
QString fileFromHash(char *hash)
|
||||
QString fileFromHash(const char *hash)
|
||||
{
|
||||
if (!hash || !*hash)
|
||||
return "";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue