]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/base/RegexPattern.cc
b6923326d4cb4b7328114b54dbd3f5ec76e5a5e1
2 * Copyright (C) 1996-2016 The Squid Software Foundation and contributors
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
10 #include "base/RegexPattern.h"
13 RegexPattern::RegexPattern(int aFlags
, const char *aPattern
) :
15 pattern(xstrdup(aPattern
))
17 memset(®ex
, 0, sizeof(regex
));
20 RegexPattern::RegexPattern(RegexPattern
&&o
) :
21 flags(std::move(o
.flags
)),
22 regex(std::move(o
.regex
)),
23 pattern(std::move(o
.pattern
))
25 memset(&o
.regex
, 0, sizeof(o
.regex
));
29 RegexPattern::~RegexPattern()
36 RegexPattern::operator =(RegexPattern
&&o
)
38 flags
= std::move(o
.flags
);
39 regex
= std::move(o
.regex
);
40 memset(&o
.regex
, 0, sizeof(o
.regex
));
41 pattern
= std::move(o
.pattern
);