Skip to content

Commit

Permalink
Clearer typed code
Browse files Browse the repository at this point in the history
  • Loading branch information
teusbenschop committed Dec 31, 2023
1 parent 2a3e2ca commit 9f7d42d
Show file tree
Hide file tree
Showing 156 changed files with 439 additions and 144 deletions.
12 changes: 6 additions & 6 deletions bootstrap/bootstrap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -417,18 +417,18 @@ void bootstrap_index (Webserver_Request& webserver_request)
return;
}

if ((url == search_index_url ()) && browser_request_security_okay (webserver_request) && search_index_acl (std::addressof(webserver_request))) {
webserver_request.reply = search_index (std::addressof(webserver_request));
if ((url == search_index_url ()) && browser_request_security_okay (webserver_request) && search_index_acl (webserver_request)) {
webserver_request.reply = search_index (webserver_request);
return;
}

if ((url == workspace_index_url ()) && browser_request_security_okay (webserver_request) && workspace_index_acl (std::addressof(webserver_request))) {
webserver_request.reply = workspace_index (std::addressof(webserver_request));
if ((url == workspace_index_url ()) && browser_request_security_okay (webserver_request) && workspace_index_acl (webserver_request)) {
webserver_request.reply = workspace_index (webserver_request);
return;
}

if ((url == workspace_organize_url ()) && browser_request_security_okay (webserver_request) && workspace_organize_acl (std::addressof(webserver_request))) {
webserver_request.reply = workspace_organize (std::addressof(webserver_request));
if ((url == workspace_organize_url ()) && browser_request_security_okay (webserver_request) && workspace_organize_acl (webserver_request)) {
webserver_request.reply = workspace_organize (webserver_request);
return;
}

Expand Down
2 changes: 2 additions & 0 deletions changes/change.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include <config/libraries.h>

class Webserver_Request;

std::string changes_change_url ();
bool changes_change_acl (void * webserver_request);
std::string changes_change (void * webserver_request);
2 changes: 2 additions & 0 deletions changes/changes.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include <config/libraries.h>

class Webserver_Request;

std::string changes_changes_url ();
bool changes_changes_acl (void * webserver_request);
std::string changes_changes (void * webserver_request);
2 changes: 2 additions & 0 deletions changes/manage.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include <config/libraries.h>

class Webserver_Request;

std::string changes_manage_url ();
bool changes_manage_acl (void * webserver_request);
std::string changes_manage (void * webserver_request);
2 changes: 2 additions & 0 deletions changes/statistics.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include <config/libraries.h>

class Webserver_Request;

std::string changes_statistics_url ();
bool changes_statistics_acl (void * webserver_request);
std::string changes_statistics (void * webserver_request);
2 changes: 2 additions & 0 deletions checks/index.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include <config/libraries.h>

class Webserver_Request;

std::string checks_index_url ();
bool checks_index_acl (void * webserver_request);
std::string checks_index (void * webserver_request);
2 changes: 2 additions & 0 deletions checks/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include <config/libraries.h>

class Webserver_Request;

std::string checks_settings_url ();
bool checks_settings_acl (void * webserver_request);
std::string checks_settings (void * webserver_request);
2 changes: 2 additions & 0 deletions checks/settingspairs.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include <config/libraries.h>

class Webserver_Request;

std::string checks_settingspairs_url ();
bool checks_settingspairs_acl (void * webserver_request);
std::string checks_settingspairs (void * webserver_request);
2 changes: 2 additions & 0 deletions checks/settingspatterns.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include <config/libraries.h>

class Webserver_Request;

std::string checks_settingspatterns_url ();
bool checks_settingspatterns_acl (void * webserver_request);
std::string checks_settingspatterns (void * webserver_request);
2 changes: 2 additions & 0 deletions checks/settingssentences.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include <config/libraries.h>

class Webserver_Request;

std::string checks_settingssentences_url ();
bool checks_settingssentences_acl (void * webserver_request);
std::string checks_settingssentences (void * webserver_request);
2 changes: 2 additions & 0 deletions checks/suppress.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include <config/libraries.h>

class Webserver_Request;

std::string checks_suppress_url ();
bool checks_suppress_acl (void * webserver_request);
std::string checks_suppress (void * webserver_request);
2 changes: 2 additions & 0 deletions client/index.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include <config/libraries.h>

class Webserver_Request;

std::string client_index_url ();
bool client_index_acl (void * webserver_request);
std::string client_index (void * webserver_request);
2 changes: 2 additions & 0 deletions collaboration/index.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include <config/libraries.h>

class Webserver_Request;

std::string collaboration_index_url ();
bool collaboration_index_acl (void * webserver_request);
std::string collaboration_index (void * webserver_request);
2 changes: 2 additions & 0 deletions collaboration/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include <config/libraries.h>

class Webserver_Request;

std::string collaboration_settings_url ();
bool collaboration_settings_acl (void * webserver_request);
std::string collaboration_settings (void * webserver_request);
2 changes: 2 additions & 0 deletions consistency/index.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include <config/libraries.h>

class Webserver_Request;

std::string consistency_index_url ();
bool consistency_index_acl (void * webserver_request);
std::string consistency_index (void * webserver_request);
2 changes: 2 additions & 0 deletions consistency/input.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include <config/libraries.h>

class Webserver_Request;

std::string consistency_input_url ();
bool consistency_input_acl (void * webserver_request);
std::string consistency_input (void * webserver_request);
2 changes: 2 additions & 0 deletions consistency/poll.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include <config/libraries.h>

class Webserver_Request;

std::string consistency_poll_url ();
bool consistency_poll_acl (void * webserver_request);
std::string consistency_poll (void * webserver_request);
2 changes: 2 additions & 0 deletions developer/delay.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

#include <config/libraries.h>

class Webserver_Request;

const char * developer_delay_url ();
bool developer_delay_acl (void * webserver_request);
std::string developer_delay (void * webserver_request);
2 changes: 2 additions & 0 deletions developer/index.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

#include <config/libraries.h>

class Webserver_Request;

const char * developer_index_url ();
bool developer_index_acl (void * webserver_request);
std::string developer_index (void * webserver_request);
2 changes: 2 additions & 0 deletions edit/edit.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include <config/libraries.h>

class Webserver_Request;

std::string edit_edit_url ();
bool edit_edit_acl (void * webserver_request);
std::string edit_edit (void * webserver_request);
2 changes: 2 additions & 0 deletions edit/id.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include <config/libraries.h>

class Webserver_Request;

std::string edit_id_url ();
bool edit_id_acl (void * webserver_request);
std::string edit_id (void * webserver_request);
2 changes: 2 additions & 0 deletions edit/load.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include <config/libraries.h>

class Webserver_Request;

std::string edit_load_url ();
bool edit_load_acl (void * webserver_request);
std::string edit_load (void * webserver_request);
2 changes: 2 additions & 0 deletions edit/preview.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include <config/libraries.h>

class Webserver_Request;

std::string edit_preview_url ();
bool edit_preview_acl (void * webserver_request);
std::string edit_preview (void * webserver_request);
2 changes: 2 additions & 0 deletions edit/save.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include <config/libraries.h>

class Webserver_Request;

std::string edit_save_url ();
bool edit_save_acl (void * webserver_request);
std::string edit_save (void * webserver_request);
2 changes: 2 additions & 0 deletions edit/styles.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include <config/libraries.h>

class Webserver_Request;

std::string edit_styles_url ();
bool edit_styles_acl (void * webserver_request);
std::string edit_styles (void * webserver_request);
2 changes: 2 additions & 0 deletions edit/update.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include <config/libraries.h>

class Webserver_Request;

std::string edit_update_url ();
bool edit_update_acl (void * webserver_request);
std::string edit_update (void * webserver_request);
2 changes: 2 additions & 0 deletions editone2/index.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include <config/libraries.h>

class Webserver_Request;

std::string editone2_index_url ();
bool editone2_index_acl (void * webserver_request);
std::string editone2_index (void * webserver_request);
2 changes: 2 additions & 0 deletions editone2/load.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include <config/libraries.h>

class Webserver_Request;

std::string editone2_load_url ();
bool editone2_load_acl (void * webserver_request);
std::string editone2_load (void * webserver_request);
2 changes: 2 additions & 0 deletions editone2/save.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include <config/libraries.h>

class Webserver_Request;

std::string editone2_save_url ();
bool editone2_save_acl (void * webserver_request);
std::string editone2_save (void * webserver_request);
2 changes: 2 additions & 0 deletions editone2/update.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include <config/libraries.h>

class Webserver_Request;

std::string editone2_update_url ();
bool editone2_update_acl (void * webserver_request);
std::string editone2_update (void * webserver_request);
2 changes: 2 additions & 0 deletions editone2/verse.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include <config/libraries.h>

class Webserver_Request;

std::string editone2_verse_url ();
bool editone2_verse_acl (void * webserver_request);
std::string editone2_verse (void * webserver_request);
2 changes: 2 additions & 0 deletions editor/id.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include <config/libraries.h>

class Webserver_Request;

std::string editor_id_url ();
bool editor_id_acl (void * webserver_request);
std::string editor_id (void * webserver_request);
2 changes: 2 additions & 0 deletions editor/select.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include <config/libraries.h>

class Webserver_Request;

std::string editor_select_url ();
bool editor_select_acl (void * webserver_request);
std::string editor_select (void * webserver_request);
2 changes: 2 additions & 0 deletions editor/style.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include <config/libraries.h>

class Webserver_Request;

std::string editor_style_url ();
bool editor_style_acl (void * webserver_request);
std::string editor_style (void * webserver_request);
2 changes: 2 additions & 0 deletions editusfm/focus.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include <config/libraries.h>

class Webserver_Request;

std::string editusfm_focus_url ();
bool editusfm_focus_acl (void * webserver_request);
std::string editusfm_focus (void * webserver_request);
2 changes: 2 additions & 0 deletions editusfm/load.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include <config/libraries.h>

class Webserver_Request;

std::string editusfm_load_url ();
bool editusfm_load_acl (void * webserver_request);
std::string editusfm_load (void * webserver_request);
2 changes: 2 additions & 0 deletions editusfm/offset.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include <config/libraries.h>

class Webserver_Request;

std::string editusfm_offset_url ();
bool editusfm_offset_acl (void * webserver_request);
std::string editusfm_offset (void * webserver_request);
2 changes: 2 additions & 0 deletions editusfm/save.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include <config/libraries.h>

class Webserver_Request;

std::string editusfm_save_url ();
bool editusfm_save_acl (void * webserver_request);
std::string editusfm_save (void * webserver_request);
2 changes: 2 additions & 0 deletions email/index.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

#include <config/libraries.h>

class Webserver_Request;

std::string email_index_url ();
bool email_index_acl (void * webserver_request);
std::string email_index (void * webserver_request);
2 changes: 1 addition & 1 deletion filter/passage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ bool Passage::equal (Passage & passage)
// This method converts the passage of the object into text, like e.g. so:
// "hexadecimal Bible _1_2_3".
// First the hexadecimal Bible comes, then the book identifier, then the chapter number, and finally the verse number.
string Passage::encode ()
string Passage::encode () const
{
string text;
// The encoded passage can be used as an attribute in the HTML DOM.
Expand Down
2 changes: 1 addition & 1 deletion filter/passage.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class Passage
int m_chapter {};
std::string m_verse {};
bool equal (Passage & passage);
std::string encode ();
std::string encode () const;
static Passage decode (const std::string& encoded);
};

Expand Down
2 changes: 2 additions & 0 deletions help/index.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

#include <config/libraries.h>

class Webserver_Request;

std::string help_index_html (const std::string& url);
bool help_index_url (const std::string& url);
bool help_index_acl (void * webserver_request);
Expand Down
Loading

0 comments on commit 9f7d42d

Please sign in to comment.