Skip to content

Commit cedf950

Browse files
committed
Fix code style to clang-format
1 parent ea1b849 commit cedf950

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

homework/password-check/validation.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
#include <string>
1+
#include "validation.hpp"
22
#include <algorithm>
33
#include <cctype>
4-
#include "validation.hpp"
4+
#include <string>
55

66
std::string getErrorMessage(const ErrorCode errorCode) {
77
std::string errorMessage{};
8-
switch(errorCode) {
8+
switch (errorCode) {
99
case ErrorCode::Ok:
1010
errorMessage = "Ok";
1111
break;
@@ -40,13 +40,13 @@ ErrorCode checkPasswordRules(const std::string& password) {
4040
if (password.size() < 9) {
4141
errorCode = ErrorCode::PasswordNeedsAtLeastNineCharacters;
4242
}
43-
if (std::none_of(password.cbegin(), password.cend(), [](const char c){return std::isdigit(c);})) {
43+
if (std::none_of(password.cbegin(), password.cend(), [](const char c) { return std::isdigit(c); })) {
4444
errorCode = ErrorCode::PasswordNeedsAtLeastOneNumber;
4545
}
46-
if (std::none_of(password.cbegin(), password.cend(), [](const char c){return std::ispunct(c);})) {
46+
if (std::none_of(password.cbegin(), password.cend(), [](const char c) { return std::ispunct(c); })) {
4747
errorCode = ErrorCode::PasswordNeedsAtLeastOneSpecialCharacter;
4848
}
49-
if (std::none_of(password.cbegin(), password.cend(), [](const char c){return std::isupper(c);})) {
49+
if (std::none_of(password.cbegin(), password.cend(), [](const char c) { return std::isupper(c); })) {
5050
errorCode = ErrorCode::PasswordNeedsAtLeastOneUppercaseLetter;
5151
}
5252
return errorCode;

0 commit comments

Comments
 (0)