mirror of
https://github.com/shadps4-emu/ext-fmt.git
synced 2024-11-23 01:39:40 +00:00
Backport from GoogleTest: "Always initialize fields in MatcherBase constructors" (https://github.com/google/googletest/pull/3797)
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
This commit is contained in:
parent
6870e4b06b
commit
b6de66819e
@ -6390,17 +6390,18 @@ class MatcherBase : private MatcherDescriberInterface {
|
||||
}
|
||||
|
||||
protected:
|
||||
MatcherBase() : vtable_(nullptr) {}
|
||||
MatcherBase() : vtable_(nullptr), buffer_() {}
|
||||
|
||||
// Constructs a matcher from its implementation.
|
||||
template <typename U>
|
||||
explicit MatcherBase(const MatcherInterface<U>* impl) {
|
||||
explicit MatcherBase(const MatcherInterface<U>* impl)
|
||||
: vtable_(nullptr), buffer_() {
|
||||
Init(impl);
|
||||
}
|
||||
|
||||
template <typename M, typename = typename std::remove_reference<
|
||||
M>::type::is_gtest_matcher>
|
||||
MatcherBase(M&& m) { // NOLINT
|
||||
MatcherBase(M&& m) : vtable_(nullptr), buffer_() { // NOLINT
|
||||
Init(std::forward<M>(m));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user