Skip to content

Commit e2a8864

Browse files
committed
code clean
1 parent b9e5135 commit e2a8864

File tree

2 files changed

+0
-16
lines changed

2 files changed

+0
-16
lines changed

cryptor.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ void Cryptor::encryptFile()
6969
file.write(buff);
7070
file.close();
7171
}
72-
7372
void Cryptor::decryptFile()
7473
{
7574
if(!file.exists())

passworddatabase.cpp

-15
Original file line numberDiff line numberDiff line change
@@ -20,31 +20,26 @@ PasswordDataBase::PasswordDataBase()
2020

2121
PasswordDataBase::~PasswordDataBase()
2222
{}
23-
2423
void PasswordDataBase::start()
2524
{
2625
decryptDataFile();
2726
readToMap();
2827
showMenu();
2928
}
30-
3129
void PasswordDataBase::finish()
3230
{
3331
writeFromMap();
3432
encryptDataFile();
3533
exit(0);
3634
}
37-
3835
void PasswordDataBase::decryptDataFile()
3936
{
4037
cryptor.decryptFile();
4138
}
42-
4339
void PasswordDataBase::encryptDataFile()
4440
{
4541
cryptor.encryptFile();
4642
}
47-
4843
void PasswordDataBase::readToMap()
4944
{
5045
element_multi_map.clear();
@@ -63,7 +58,6 @@ void PasswordDataBase::readToMap()
6358

6459
data_file.close();
6560
}
66-
6761
void PasswordDataBase::writeFromMap()
6862
{
6963
if(!data_file.isOpen())
@@ -98,7 +92,6 @@ void PasswordDataBase::writeFromMap()
9892

9993
data_file.close();
10094
}
101-
10295
void PasswordDataBase::showMap()
10396
{
10497
short counter = 0;
@@ -114,7 +107,6 @@ void PasswordDataBase::showMap()
114107
}
115108

116109
}
117-
118110
void PasswordDataBase::showMenu()
119111
{
120112
while(true)
@@ -142,7 +134,6 @@ void PasswordDataBase::showMenu()
142134
}
143135
}
144136
}
145-
146137
void PasswordDataBase::addElement()
147138
{
148139
string name, note, password;
@@ -185,7 +176,6 @@ void PasswordDataBase::addElement()
185176
element_multi_map.insertMulti(QString::fromStdString(name), QString::fromStdString(note));
186177
element_multi_map.insertMulti(QString::fromStdString(name), QString::fromStdString(password));
187178
}
188-
189179
void PasswordDataBase::showElement()
190180
{
191181
string name, note, password;
@@ -230,7 +220,6 @@ void PasswordDataBase::showElement()
230220
cin.ignore(10, '\n');
231221
return;
232222
}
233-
234223
void PasswordDataBase::editElement()
235224
{
236225
string new_name, name, note, password;
@@ -335,7 +324,6 @@ void PasswordDataBase::editElement()
335324
new_name.clear();
336325
}
337326
}
338-
339327
void PasswordDataBase::removeElement()
340328
{
341329
string name;
@@ -365,12 +353,10 @@ void PasswordDataBase::removeElement()
365353
cin.clear();
366354
cin.ignore(10, '\n');
367355
}
368-
369356
void PasswordDataBase::wipeDataFile()
370357
{
371358
element_multi_map.clear();
372359
}
373-
374360
string PasswordDataBase::generatePassword()
375361
{
376362
string password;
@@ -409,7 +395,6 @@ string PasswordDataBase::generatePassword()
409395

410396
return password;
411397
}
412-
413398
int PasswordDataBase::getSwitchChoice(int min, int max)
414399
{
415400
int value;

0 commit comments

Comments
 (0)