Skip to content

Commit

Permalink
- Use constructor delegation
Browse files Browse the repository at this point in the history
  • Loading branch information
ayushsharma82 committed Dec 3, 2023
1 parent e711c37 commit 69df9c2
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/ESPDash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,9 @@ struct ChartNames chartTags[] = {
/*
Constructors
*/
ESPDash::ESPDash(AsyncWebServer* server) {
// Call other constructor with default uri
ESPDash(server, "/", true);
}
ESPDash::ESPDash(AsyncWebServer* server) : ESPDash(server, "/", true) {}

ESPDash::ESPDash(AsyncWebServer* server, bool enable_default_stats) {
// Call other constructor with default uri
ESPDash(server, "/", enable_default_stats);
}
ESPDash::ESPDash(AsyncWebServer* server, bool enable_default_stats) : ESPDash(server, "/", enable_default_stats) {}

ESPDash::ESPDash(AsyncWebServer* server, const char* uri, bool enable_default_stats) {
_server = server;
Expand Down

0 comments on commit 69df9c2

Please sign in to comment.