forked from Mirrors/privacore-open-source-search-engine
constness in Url
This commit is contained in:
2
Url.cpp
2
Url.cpp
@ -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
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 ();
|
||||
|
Reference in New Issue
Block a user