inmem_lo(0),
nclients(0),
smpCollapsed(false),
- request(NULL),
- ping_reply_callback(NULL),
- ircb_data(NULL),
+ request(nullptr),
+ ping_reply_callback(nullptr),
+ ircb_data(nullptr),
id(0),
object_sz(-1),
swap_hdr_sz(0),
#if URL_CHECKSUM_DEBUG
chksum(0),
#endif
- vary_headers(NULL)
+ vary_headers(nullptr)
{
debugs(20, 3, "new MemObject " << this);
memset(&start_ping, 0, sizeof(start_ping));
return true;
}
+StoreMeta::StoreMeta(const StoreMeta &s) :
+ length(s.length),
+ value(s.value),
+ next(s.next)
+{}
+
+StoreMeta& StoreMeta::operator=(const StoreMeta &s)
+{
+ length=s.length;
+ value=s.value;
+ next=s.next;
+ return *this;
+}
/// \ingroup SwapStoreAPI
class StoreMeta
{
+protected:
+ StoreMeta() : length(-1), value(nullptr), next(nullptr) { }
+ StoreMeta(const StoreMeta &);
+ StoreMeta& operator=(const StoreMeta &);
+
public:
static bool validType(char);
static int const MaximumTLVLength;
MEMPROXY_CLASS(URL);
public:
- URL() : scheme_(), hostIsNumeric_(false), port_(0) {*host_=0;}
- URL(AnyP::UriScheme const &aScheme) : scheme_(aScheme), hostIsNumeric_(false), port_(0) {*host_=0;}
+ URL() : hostIsNumeric_(false), port_(0) {*host_=0;}
+ URL(AnyP::UriScheme const &aScheme);
void clear() {
scheme_=AnyP::PROTO_NONE;
}
ACL::ACL() :
+ cfgline(nullptr),
+ next(nullptr),
+ registered(false)
+{
+ *name = 0;
+}
+
+ACL::ACL(const ACLFlag flgs[]) :
cfgline(NULL),
next(NULL),
+ flags(flgs),
registered(false)
{
*name = 0;
link = link->next;
}
- auth_match = new acl_proxy_auth_match_cache();
- auth_match->matchrv = matchForCache (checklist);
- auth_match->acl_data = this;
+ auth_match = new acl_proxy_auth_match_cache(matchForCache(checklist), this);
dlinkAddTail(auth_match, &auth_match->link, cache);
debugs(28, 4, "ACL::cacheMatchAcl: miss for '" << name << "'. Adding result " << auth_match->matchrv);
return auth_match->matchrv;
static ACL *FindByName(const char *name);
ACL();
- explicit ACL(const ACLFlag flgs[]) : cfgline(NULL), next(NULL), flags(flgs), registered(false) {
- *name = 0;
- }
+ explicit ACL(const ACLFlag flgs[]);
virtual ~ACL();
/// sets user-specified ACL name and squid.conf context
MEMPROXY_CLASS(acl_proxy_auth_match_cache);
public:
+ acl_proxy_auth_match_cache(int matchRv, void * aclData) :
+ matchrv(matchRv),
+ acl_data(aclData)
+ {}
+
dlink_node link;
int matchrv;
void *acl_data;
MEMPROXY_CLASS(ACLASN);
public:
+ ACLASN() : data(nullptr) {}
virtual ~ACLASN();
virtual bool match(Ip::Address);
MEMPROXY_CLASS(ACLDomainData);
public:
+ ACLDomainData() : domains(nullptr) {}
virtual ~ACLDomainData();
virtual bool match(char const *);
virtual SBufList dump() const;
return (lhs.caseCmp(rhs) < 0);
}
-static bool
-CaseSensitveSBufCompare(const SBuf &lhs, const SBuf &rhs)
-{
- return (lhs < rhs);
-}
-
-ACLUserData::ACLUserData() : userDataNames(CaseSensitveSBufCompare)
+ACLUserData::ACLUserData() :
+ userDataNames()
{
flags.case_insensitive = false;
flags.required = false;
delete data;
}
-ACLProxyAuth::ACLProxyAuth(ACLData<char const *> *newData, char const *theType) : data(newData), type_(theType) {}
+ACLProxyAuth::ACLProxyAuth(ACLData<char const *> *newData, char const *theType) :
+ data(newData),
+ type_(theType)
+{}
-ACLProxyAuth::ACLProxyAuth(ACLProxyAuth const &old) : data(old.data->clone()), type_(old.type_)
+ACLProxyAuth::ACLProxyAuth(ACLProxyAuth const &old) :
+ data(old.data->clone()),
+ type_(old.type_)
{}
ACLProxyAuth &
config(aConfig),
ipcount(0),
expiretime(0),
- notes(),
credentials_state(Auth::Unchecked),
- username_(NULL),
+ username_(nullptr),
requestRealm_(aRequestRealm)
{
proxy_match_cache.head = proxy_match_cache.tail = NULL;
#include "MemBuf.h"
#include "SquidTime.h"
-Auth::Negotiate::UserRequest::UserRequest()
-{
- waiting=0;
- client_blob=0;
- server_blob=0;
- authserver=NULL;
- request=NULL;
-}
+Auth::Negotiate::UserRequest::UserRequest() :
+ authserver(nullptr),
+ server_blob(nullptr),
+ client_blob(nullptr),
+ waiting(0),
+ request(nullptr)
+{}
Auth::Negotiate::UserRequest::~UserRequest()
{
#include "MemBuf.h"
#include "SquidTime.h"
-Auth::Ntlm::UserRequest::UserRequest()
-{
- waiting=0;
- client_blob=0;
- server_blob=0;
- authserver=NULL;
- request=NULL;
-}
+Auth::Ntlm::UserRequest::UserRequest() :
+ authserver(nullptr),
+ server_blob(nullptr),
+ client_blob(nullptr),
+ waiting(0),
+ request(nullptr)
+{}
Auth::Ntlm::UserRequest::~UserRequest()
{
}
Comm::Connection::Connection() :
- local(),
- remote(),
peerType(HIER_NONE),
fd(-1),
tos(0),
nfmark(0),
flags(COMM_NONBLOCKING),
- peer_(NULL),
+ peer_(nullptr),
startTime_(squid_curtime)
{
*rfc931 = 0; // quick init the head. the rest does not matter.
cbdataReferenceDone (varState);
}
-esiLiteral::esiLiteral(ESISegment::Pointer aSegment)
+esiLiteral::esiLiteral(ESISegment::Pointer aSegment) :
+ buffer(aSegment),
+ varState(nullptr)
{
- buffer = aSegment;
- /* we've been handed a complete, processed string */
- varState = NULL;
/* Nothing to do */
flags.donevars = 1;
}
debugs(86, 5, "esiChoose::~esiChoose " << this);
}
-esiChoose::esiChoose(esiTreeParentPtr aParent) : elements (), chosenelement (-1),parent (aParent)
+esiChoose::esiChoose(esiTreeParentPtr aParent) :
+ elements(),
+ chosenelement(-1),
+ parent(aParent)
{}
void
public:
typedef RefCount<external_acl_format> Pointer;
- external_acl_format() : type(Format::LFT_NONE), header(NULL), member(NULL), separator(' '), header_id(Http::HdrType::BAD_HDR) {}
+ external_acl_format() :
+ type(Format::LFT_NONE),
+ header(nullptr),
+ member(nullptr),
+ separator(' '),
+ header_id(Http::HdrType::BAD_HDR)
+ {}
~external_acl_format() {
xfree(header);
xfree(member);
{
MEMPROXY_CLASS(UFSStoreState::_queued_read);
public:
- _queued_read() : buf(NULL), size(0), offset(0), callback(NULL), callback_data(NULL) {}
+ _queued_read() :
+ buf(nullptr),
+ size(0),
+ offset(0),
+ callback(nullptr),
+ callback_data(nullptr)
+ {}
char *buf;
size_t size;
{
MEMPROXY_CLASS(UFSStoreState::_queued_write);
public:
- _queued_write() : buf(NULL), size(0), offset(0), free_func(NULL) {}
+ _queued_write() :
+ buf(nullptr),
+ size(0),
+ offset(0),
+ free_func(nullptr)
+ {}
char const *buf;
size_t size;
}
MimeIcon::MimeIcon(const char *aName) :
- icon_(aName)
+ url_(nullptr)
{
- url_ = xstrdup(internalLocalUri("/squid-internal-static/icons/", icon_));
+ setName(aName);
}
MimeIcon::~MimeIcon()
return Host;
}
+URL::URL(AnyP::UriScheme const &aScheme) :
+ scheme_(aScheme),
+ hostIsNumeric_(false),
+ port_(0)
+{
+ *host_=0;
+}