formatting

This commit is contained in:
proddy
2020-07-16 22:35:51 +02:00
parent 36ad77511f
commit 0305c207d7
2 changed files with 102 additions and 102 deletions

View File

@@ -12,14 +12,14 @@ class FSPersistence {
StatefulService<T>* statefulService, StatefulService<T>* statefulService,
FS* fs, FS* fs,
char const* filePath, char const* filePath,
size_t bufferSize = DEFAULT_BUFFER_SIZE) size_t bufferSize = DEFAULT_BUFFER_SIZE) :
: _stateReader(stateReader) _stateReader(stateReader),
, _stateUpdater(stateUpdater) _stateUpdater(stateUpdater),
, _statefulService(statefulService) _statefulService(statefulService),
, _fs(fs) _fs(fs),
, _filePath(filePath) _filePath(filePath),
, _bufferSize(bufferSize) _bufferSize(bufferSize),
, _updateHandlerId(0) { _updateHandlerId(0) {
enableUpdateHandler(); enableUpdateHandler();
} }
@@ -37,9 +37,9 @@ class FSPersistence {
} }
settingsFile.close(); settingsFile.close();
} }
// If we reach here we have not been successful in loading the config, // If we reach here we have not been successful in loading the config,
// hard-coded emergency defaults are now applied. // hard-coded emergency defaults are now applied.
applyDefaults(); applyDefaults();
} }

View File

@@ -2,11 +2,11 @@
using namespace std::placeholders; using namespace std::placeholders;
FactoryResetService::FactoryResetService(AsyncWebServer * server, FS * fs, SecurityManager * securityManager) FactoryResetService::FactoryResetService(AsyncWebServer* server, FS* fs, SecurityManager* securityManager) : fs(fs) {
: fs(fs) {
server->on(FACTORY_RESET_SERVICE_PATH, server->on(FACTORY_RESET_SERVICE_PATH,
HTTP_POST, HTTP_POST,
securityManager->wrapRequest(std::bind(&FactoryResetService::handleRequest, this, _1), AuthenticationPredicates::IS_ADMIN)); securityManager->wrapRequest(std::bind(&FactoryResetService::handleRequest, this, _1),
AuthenticationPredicates::IS_ADMIN));
} }
void FactoryResetService::handleRequest(AsyncWebServerRequest* request) { void FactoryResetService::handleRequest(AsyncWebServerRequest* request) {