reformat some files after clang-format option change

This commit is contained in:
Martin Michelsen
2023-05-02 09:27:34 -07:00
parent 4f2e333d6c
commit 6654030bd3
7 changed files with 356 additions and 352 deletions
+14 -8
View File
@@ -10,7 +10,10 @@
using namespace std;
License::License() : serial_number(0), privileges(0), ban_end_time(0) {}
License::License()
: serial_number(0),
privileges(0),
ban_end_time(0) {}
string License::str() const {
string ret = string_printf("License(serial_number=%" PRIu32, this->serial_number);
@@ -37,10 +40,13 @@ string License::str() const {
return ret + ")";
}
LicenseManager::LicenseManager() : filename(""), autosave(false) {}
LicenseManager::LicenseManager()
: filename(""),
autosave(false) {}
LicenseManager::LicenseManager(const string& filename)
: filename(filename), autosave(true) {
: filename(filename),
autosave(true) {
try {
auto licenses = load_vector_file<License>(this->filename);
for (const auto& read_license : licenses) {
@@ -58,7 +64,7 @@ LicenseManager::LicenseManager(const string& filename)
} catch (const cannot_open_file&) {
license_log.warning("File %s does not exist; no licenses are registered",
this->filename.c_str());
this->filename.c_str());
}
}
@@ -80,7 +86,7 @@ void LicenseManager::set_autosave(bool autosave) {
}
shared_ptr<const License> LicenseManager::verify_pc(uint32_t serial_number,
const string& access_key) const {
const string& access_key) const {
try {
auto& license = this->serial_number_to_license.at(serial_number);
if (!license->access_key.eq_n(access_key, 8)) {
@@ -97,7 +103,7 @@ shared_ptr<const License> LicenseManager::verify_pc(uint32_t serial_number,
}
shared_ptr<const License> LicenseManager::verify_gc(uint32_t serial_number,
const string& access_key) const {
const string& access_key) const {
try {
auto& license = this->serial_number_to_license.at(serial_number);
if (!license->access_key.eq_n(access_key, 12)) {
@@ -113,7 +119,7 @@ shared_ptr<const License> LicenseManager::verify_gc(uint32_t serial_number,
}
shared_ptr<const License> LicenseManager::verify_gc(uint32_t serial_number,
const string& access_key, const string& password) const {
const string& access_key, const string& password) const {
try {
auto& license = this->serial_number_to_license.at(serial_number);
if (!license->access_key.eq_n(access_key, 12)) {
@@ -132,7 +138,7 @@ shared_ptr<const License> LicenseManager::verify_gc(uint32_t serial_number,
}
shared_ptr<const License> LicenseManager::verify_bb(const string& username,
const string& password) const {
const string& password) const {
try {
auto& license = this->bb_username_to_license.at(username);
if (license->bb_password != password) {