mirror of
https://github.com/google/googletest.git
synced 2025-04-07 22:40:29 +00:00
Explicitly instantiate matchee std::string in MatchesRegex
If this ever turns out to be a performance issue, we could use std::conditional and std::is_same to avoid copying std::strings. Fixes #3949 PiperOrigin-RevId: 465353572 Change-Id: If2d691bccb626c692c87e006df5afe88a4ed1542
This commit is contained in:
parent
6045bf2ade
commit
5b909beeec
1 changed files with 1 additions and 1 deletions
|
@ -842,7 +842,7 @@ class MatchesRegexMatcher {
|
|||
template <class MatcheeStringType>
|
||||
bool MatchAndExplain(const MatcheeStringType& s,
|
||||
MatchResultListener* /* listener */) const {
|
||||
const std::string& s2(s);
|
||||
const std::string s2(s);
|
||||
return full_match_ ? RE::FullMatch(s2, *regex_)
|
||||
: RE::PartialMatch(s2, *regex_);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue