aboutsummaryrefslogtreecommitdiff
path: root/src/hardware_functions.cpp
diff options
context:
space:
mode:
authoroldmud0 <oldmud0@users.noreply.github.com>2020-05-22 17:13:17 -0500
committeroldmud0 <oldmud0@users.noreply.github.com>2020-05-22 17:13:37 -0500
commit8928aa2718378bc42d20d5bbe6c17be68d65d6f3 (patch)
treebf90d3e73519d58cc89e2135b613e308ac0a0ed8 /src/hardware_functions.cpp
parent156a760ebab6839c53f9c613881f0937e814414a (diff)
Perform clang-format
If you don't want to see this commit on blames, use the hidden whitespace option on GitHub, or use `-w` in git-blame.
Diffstat (limited to 'src/hardware_functions.cpp')
-rw-r--r--src/hardware_functions.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/hardware_functions.cpp b/src/hardware_functions.cpp
index 5d6b6ffa..4dbc4380 100644
--- a/src/hardware_functions.cpp
+++ b/src/hardware_functions.cpp
@@ -2,7 +2,7 @@
#include <QDebug>
-#if (defined (_WIN32) || defined (_WIN64))
+#if (defined(_WIN32) || defined(_WIN64))
#include <windows.h>
static DWORD dwVolSerial;
@@ -10,17 +10,18 @@ static BOOL bIsRetrieved;
QString get_hdid()
{
- bIsRetrieved = GetVolumeInformation(TEXT("C:\\"), nullptr, 0, &dwVolSerial, nullptr, nullptr, nullptr, 0);
+ bIsRetrieved = GetVolumeInformation(TEXT("C:\\"), nullptr, 0, &dwVolSerial,
+ nullptr, nullptr, nullptr, 0);
if (bIsRetrieved)
return QString::number(dwVolSerial, 16);
else
- //a totally random string
- //what could possibly go wrong
+ // a totally random string
+ // what could possibly go wrong
return "gxsps32sa9fnwic92mfbs0";
}
-#elif (defined (LINUX) || defined (__linux__))
+#elif (defined(LINUX) || defined(__linux__))
#include <QFile>
#include <QTextStream>
@@ -33,12 +34,10 @@ QString get_hdid()
QTextStream in(&fstab_file);
- while(!in.atEnd())
- {
+ while (!in.atEnd()) {
QString line = in.readLine();
- if (line.startsWith("UUID"))
- {
+ if (line.startsWith("UUID")) {
QStringList line_elements = line.split("=");
if (line_elements.size() > 1)
@@ -52,7 +51,7 @@ QString get_hdid()
#elif defined __APPLE__
QString get_hdid()
{
- //hdids are broken at this point anyways
+ // hdids are broken at this point anyways
return "just a mac passing by";
}