From 107ab08784ab82f133a1f25da958193ea51bdfd2 Mon Sep 17 00:00:00 2001 From: yggverse Date: Fri, 16 Aug 2024 08:59:50 +0300 Subject: [PATCH] return port value parsed without int conversion --- src/app/browser/main/tab/page/navbar/request.cpp | 12 +++++------- src/app/browser/main/tab/page/navbar/request.hpp | 3 +-- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/app/browser/main/tab/page/navbar/request.cpp b/src/app/browser/main/tab/page/navbar/request.cpp index 3d653813..4df7bec2 100644 --- a/src/app/browser/main/tab/page/navbar/request.cpp +++ b/src/app/browser/main/tab/page/navbar/request.cpp @@ -52,21 +52,19 @@ string Request::get_host() return host; } -string Request::get_path() +string Request::get_port() { - return path; + return port; } -string Request::get_query() +string Request::get_path() { return path; } -int Request::get_port() +string Request::get_query() { - return stoi( - port - ); + return path; } // Private helpers diff --git a/src/app/browser/main/tab/page/navbar/request.hpp b/src/app/browser/main/tab/page/navbar/request.hpp index 46431b55..afa8ec0e 100644 --- a/src/app/browser/main/tab/page/navbar/request.hpp +++ b/src/app/browser/main/tab/page/navbar/request.hpp @@ -29,10 +29,9 @@ namespace app::browser::main::tab::page::navbar std::string get_scheme(); std::string get_host(); + std::string get_port(); std::string get_path(); std::string get_query(); - - int get_port(); }; }