constness in Url

This commit is contained in:
Ivan Skytte Jørgensen
2016-05-27 18:20:01 +02:00
parent e5bac6cd9d
commit d1c9e5a0ea
2 changed files with 4 additions and 4 deletions

@ -36,7 +36,7 @@ void Url::reset() {
m_ip = 0;
}
void Url::set( Url *baseUrl, const char *s, int32_t len, bool addWWW, bool stripParams, bool stripPound,
void Url::set( const Url *baseUrl, const char *s, int32_t len, bool addWWW, bool stripParams, bool stripPound,
bool stripCommonFile, int32_t titledbVersion ) {
reset();

6
Url.h

@ -46,7 +46,7 @@ int32_t getPathDepth ( char *s , bool hasHttp );
class Url {
public:
// set from another Url, does a copy
void set( Url *url ) {
void set( const Url *url ) {
if ( ! url ) {
reset();
return;
@ -67,12 +67,12 @@ public:
set( s, len, addWWW, stripParams, false, false, titledbVersion );
}
void set( Url *baseUrl, const char *s, int32_t len ) {
void set( const Url *baseUrl, const char *s, int32_t len ) {
set( baseUrl, s, len, false, false, false, false );
}
// . "s" must be an ENCODED url
void set( Url *baseUrl, const char *s, int32_t len, bool addWWW, bool stripParams, bool stripPound,
void set( const Url *baseUrl, const char *s, int32_t len, bool addWWW, bool stripParams, bool stripPound,
bool stripCommonFile, int32_t titledbVersion = TITLEREC_CURRENT_VERSION );
void print ();