Skip to content

Commit

Permalink
[apps] UriParser const identifiers added
Browse files Browse the repository at this point in the history
  • Loading branch information
maxsharabayko authored and rndi committed Apr 18, 2019
1 parent d1ad82c commit 3ff0865
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions apps/uriparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,17 @@ UriParser::Type UriParser::type()
return m_uriType;
}

string UriParser::host(void)
string UriParser::host(void) const
{
return m_host;
}

string UriParser::port(void)
string UriParser::port(void) const
{
return m_port;
}

unsigned short int UriParser::portno(void)
unsigned short int UriParser::portno(void) const
{
// This returns port in numeric version. Fallback to 0.
try
Expand Down
8 changes: 4 additions & 4 deletions apps/uriparser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ class UriParser
std::string uri() { return m_origUri; }
std::string proto();
std::string scheme() { return proto(); }
std::string host();
std::string port();
unsigned short int portno();
std::string host() const;
std::string port() const;
unsigned short int portno() const;
std::string hostport() { return host() + ":" + port(); }
std::string path();
std::string queryValue(const std::string& strKey);
ParamProxy operator[](const std::string& key) { return ParamProxy(m_mapQuery, key); }
const std::map<std::string, std::string>& parameters() { return m_mapQuery; }
const std::map<std::string, std::string>& parameters() const { return m_mapQuery; }

private:
void Parse(const std::string& strUrl, DefaultExpect);
Expand Down

0 comments on commit 3ff0865

Please sign in to comment.