Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HPCC-32126 Performance improvements in regex code (via Coverity) #18804

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions rtl/eclrtl/eclregex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,11 @@ class RegexCacheEntry
RegexCacheEntry() = delete;

RegexCacheEntry(size32_t _patternSize, const char * _pattern, uint32_t _options, std::shared_ptr<pcre2_code_8> _compiledRegex8)
: savedOptions(_options), savedPattern(_pattern, _patternSize), compiledRegex8(_compiledRegex8)
: savedOptions(_options), savedPattern(_pattern, _patternSize), compiledRegex8(std::move(_compiledRegex8))
{}

RegexCacheEntry(size32_t _patternSize, const char * _pattern, uint32_t _options, std::shared_ptr<pcre2_code_16> _compiledRegex16)
: savedOptions(_options), savedPattern(_pattern, _patternSize), compiledRegex16(_compiledRegex16)
: savedOptions(_options), savedPattern(_pattern, _patternSize), compiledRegex16(std::move(_compiledRegex16))
{}

RegexCacheEntry(const RegexCacheEntry & other) = delete;
Expand Down Expand Up @@ -254,7 +254,7 @@ class CStrRegExprFindInstance : implements IStrRegExprFindInstance

public:
CStrRegExprFindInstance(std::shared_ptr<pcre2_code_8> _compiledRegex, const char * _subject, size32_t _from, size32_t _len, bool _keep)
: compiledRegex(_compiledRegex)
: compiledRegex(std::move(_compiledRegex))
{
// See if UTF-8 is enabled on this compiled regex
uint32_t option_bits;
Expand Down Expand Up @@ -663,7 +663,7 @@ class CUStrRegExprFindInstance : implements IUStrRegExprFindInstance

public:
CUStrRegExprFindInstance(std::shared_ptr<pcre2_code_16> _compiledRegex, const UChar * _subject, size32_t _from, size32_t _len)
: compiledRegex(_compiledRegex)
: compiledRegex(std::move(_compiledRegex))
{
subject = _subject + _from;
matched = false;
Expand Down
Loading