From af1258705b00206d5252554ee8520c75e17e5ab6 Mon Sep 17 00:00:00 2001 From: Teus Benschop Date: Sun, 26 May 2024 14:42:05 +0200 Subject: [PATCH] Reformat code --- webserver/request.cpp | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/webserver/request.cpp b/webserver/request.cpp index db5ef0c87..741e3c5a2 100644 --- a/webserver/request.cpp +++ b/webserver/request.cpp @@ -35,13 +35,20 @@ Webserver_Request::Webserver_Request () Webserver_Request::~Webserver_Request () { - if (session_logic_instance) delete session_logic_instance; - if (database_config_user_instance) delete database_config_user_instance; - if (database_users_instance) delete database_users_instance; - if (database_styles_instance) delete database_styles_instance; - if (database_bibles_instance) delete database_bibles_instance; - if (database_check_instance) delete database_check_instance; - if (database_ipc_instance) delete database_ipc_instance; + if (session_logic_instance) + delete session_logic_instance; + if (database_config_user_instance) + delete database_config_user_instance; + if (database_users_instance) + delete database_users_instance; + if (database_styles_instance) + delete database_styles_instance; + if (database_bibles_instance) + delete database_bibles_instance; + if (database_check_instance) + delete database_check_instance; + if (database_ipc_instance) + delete database_ipc_instance; } @@ -59,7 +66,8 @@ Session_Logic * Webserver_Request::session_logic () Database_Config_User * Webserver_Request::database_config_user () { // Single live object during the entire web request. - if (!database_config_user_instance) database_config_user_instance = new Database_Config_User (*this); + if (!database_config_user_instance) + database_config_user_instance = new Database_Config_User (*this); return database_config_user_instance; } @@ -68,28 +76,32 @@ Database_Config_User * Webserver_Request::database_config_user () Database_Users * Webserver_Request::database_users () { // Single live object during the entire web request. - if (!database_users_instance) database_users_instance = new Database_Users (); + if (!database_users_instance) + database_users_instance = new Database_Users (); return database_users_instance; } Database_Styles * Webserver_Request::database_styles () { - if (!database_styles_instance) database_styles_instance = new Database_Styles (); + if (!database_styles_instance) + database_styles_instance = new Database_Styles (); return database_styles_instance; } Database_Bibles * Webserver_Request::database_bibles () { - if (!database_bibles_instance) database_bibles_instance = new Database_Bibles (); + if (!database_bibles_instance) + database_bibles_instance = new Database_Bibles (); return database_bibles_instance; } Database_Check * Webserver_Request::database_check () { - if (!database_check_instance) database_check_instance = new Database_Check (); + if (!database_check_instance) + database_check_instance = new Database_Check (); return database_check_instance; }