Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/keepassxreboot/keepassxc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouis-Bertrand Varin <louisbvarin@gmail.com>2018-03-31 23:01:30 +0300
committerLouis-Bertrand Varin <louisbvarin@gmail.com>2018-03-31 23:01:30 +0300
commit8324d03f0a015e62b6182843b4478226a5197090 (patch)
treefaf34febaec7c7e764d357dc5e439f6f2b1fcaf3 /src/core/PasswordGenerator.cpp
parent74efc57369b068a0f93cb84ac68b6c17f64c8abe (diff)
Formatting the code.
Diffstat (limited to 'src/core/PasswordGenerator.cpp')
-rw-r--r--src/core/PasswordGenerator.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/core/PasswordGenerator.cpp b/src/core/PasswordGenerator.cpp
index 740fb5467..00984d313 100644
--- a/src/core/PasswordGenerator.cpp
+++ b/src/core/PasswordGenerator.cpp
@@ -45,7 +45,7 @@ void PasswordGenerator::setLength(int length)
void PasswordGenerator::setCharClasses(const CharClasses& classes)
{
if (classes == 0) {
- m_classes = DefaultCharset;
+ m_classes = DefaultCharset;
return;
}
m_classes = classes;
@@ -92,8 +92,7 @@ QString PasswordGenerator::generatePassword() const
password[i] = password[j];
password[j] = tmp;
}
- }
- else {
+ } else {
for (int i = 0; i < m_length; i++) {
int pos = randomGen()->randomUInt(passwordChars.size());
@@ -110,7 +109,7 @@ int PasswordGenerator::getbits() const
int bits = 0;
QVector<QChar> passwordChars;
- for (const PasswordGroup& group: groups) {
+ for (const PasswordGroup& group : groups) {
bits += group.size();
}
@@ -119,13 +118,11 @@ int PasswordGenerator::getbits() const
return bits;
}
-
bool PasswordGenerator::isValid() const
{
if (m_classes == 0) {
return false;
- }
- else if (m_length == 0) {
+ } else if (m_length == 0) {
return false;
}