cleaned things up

This commit is contained in:
Eric LAZO
2022-08-15 19:40:21 +02:00
parent aa03880601
commit 19da59ecf8
7 changed files with 44 additions and 61 deletions

View File

@@ -6,7 +6,7 @@
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/07/23 16:08:00 by me #+# #+# */
/* Updated: 2022/08/14 22:14:06 by erlazo ### ########.fr */
/* Updated: 2022/08/15 19:37:34 by erlazo ### ########.fr */
/* */
/* ************************************************************************** */
@@ -25,7 +25,6 @@
class LocationConfig
{
public:
// canonic stuff?
std::string path; // /path and /path/ are fine
// i remove trailing / systematically
@@ -40,7 +39,7 @@ public:
int redirect_status; // only in location
std::string redirect_uri; // only 1 per location
void print_all() // const?
void print_all() const
{
std::cout << "\nPRINTING A LOCATION\n";
@@ -58,7 +57,6 @@ public:
std::cout << "------\n";
}
// works a lot better than using a compare function...
bool operator<(const LocationConfig& rhs) const
{
int comp_lhs = 0;
@@ -81,7 +79,7 @@ public:
if (rhs.path[rhs.path.find_last_of("/") + 1] != '\0')
++comp_rhs;
return (comp_lhs < comp_rhs); // right comparison ? not <= ?
return (comp_lhs < comp_rhs);
};
bool operator==(const LocationConfig& rhs) const