Code cleanup
This commit is contained in:
parent
53ba7c9cc9
commit
c2ada74e6b
@ -26,6 +26,7 @@ public:
|
|||||||
void flushToFile();
|
void flushToFile();
|
||||||
|
|
||||||
void deleteObject();
|
void deleteObject();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const std::string fileName;
|
const std::string fileName;
|
||||||
const std::string homeDirectory = getpwuid(getuid())->pw_dir;
|
const std::string homeDirectory = getpwuid(getuid())->pw_dir;
|
||||||
|
@ -26,8 +26,7 @@ Data<T>::Data(std::string file) : fileName(std::move(file)) {
|
|||||||
|
|
||||||
document.Parse(std::string(bytes.data(), fileSize).c_str());
|
document.Parse(std::string(bytes.data(), fileSize).c_str());
|
||||||
chkExistIfs.close();
|
chkExistIfs.close();
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
// File doesnt exist we need to create one
|
// File doesnt exist we need to create one
|
||||||
// This is the job of the derives constructor.
|
// This is the job of the derives constructor.
|
||||||
chkExistIfs.close();
|
chkExistIfs.close();
|
||||||
|
@ -55,7 +55,8 @@ int main(int argc, char *argv[]) {
|
|||||||
accountOptHandler.help();
|
accountOptHandler.help();
|
||||||
}
|
}
|
||||||
if (accountOptHandler.getSetOpts()->create) {
|
if (accountOptHandler.getSetOpts()->create) {
|
||||||
accounts.emplace_back(storageD + "accounts/" + accountOptHandler.getSetOpts()->createAccount + ".json", accountOptHandler.getSetOpts()->createAccount);
|
accounts.emplace_back(storageD + "accounts/" + accountOptHandler.getSetOpts()->createAccount + ".json",
|
||||||
|
accountOptHandler.getSetOpts()->createAccount);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user