aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2019-08-05 10:31:56 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2019-08-09 10:18:38 +0900
commit62674f731b0e46d8a413e26ca1c9da27fd9aae9a (patch)
tree4af9fb574f298afc8ae22d5edf846b1299f7c6fa /lib
parent27ca32a1e5a56e09b9cc1d94224d2831004dcf3d (diff)
downloadlibquotient-62674f731b0e46d8a413e26ca1c9da27fd9aae9a.tar.gz
libquotient-62674f731b0e46d8a413e26ca1c9da27fd9aae9a.zip
stringToHueF: pick a safer name for the variable
std::string is still a thing, after all.
Diffstat (limited to 'lib')
-rw-r--r--lib/util.cpp6
-rw-r--r--lib/util.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/util.cpp b/lib/util.cpp
index be9656f8..cc18d9ab 100644
--- a/lib/util.cpp
+++ b/lib/util.cpp
@@ -99,10 +99,10 @@ QString Quotient::cacheLocation(const QString& dirName)
return cachePath;
}
-qreal Quotient::stringToHueF(const QString& string)
+qreal Quotient::stringToHueF(const QString& s)
{
- Q_ASSERT(!string.isEmpty());
- QByteArray hash = QCryptographicHash::hash(string.toUtf8(),
+ Q_ASSERT(!s.isEmpty());
+ QByteArray hash = QCryptographicHash::hash(s.toUtf8(),
QCryptographicHash::Sha1);
QDataStream dataStream(qToLittleEndian(hash).left(2));
dataStream.setByteOrder(QDataStream::LittleEndian);
diff --git a/lib/util.h b/lib/util.h
index d94c7321..12d3f8ba 100644
--- a/lib/util.h
+++ b/lib/util.h
@@ -326,7 +326,7 @@ QString cacheLocation(const QString& dirName);
* Naming and range are the same as QColor's hueF method:
* https://doc.qt.io/qt-5/qcolor.html#integer-vs-floating-point-precision
*/
-qreal stringToHueF(const QString& string);
+qreal stringToHueF(const QString& s);
/** Extract the serverpart from MXID */
QString serverPart(const QString& mxId);