From bda85449f48f2d80a494c8c07766b6aba3170f3b Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Tue, 10 May 2022 09:38:54 -0700 Subject: Fixup some missing overrides in googletest. This CL adds a couple missing overrides in the googletest sources. These were found downstream when -Wsuggest-override and -Wsuggest-destructor-override were enabled. PiperOrigin-RevId: 447754883 Change-Id: I7bf35a8757cbc5ae157827037aa3d13f47392406 --- googletest/include/gtest/internal/gtest-port.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/googletest/include/gtest/internal/gtest-port.h b/googletest/include/gtest/internal/gtest-port.h index b1cae90..7162e6e 100644 --- a/googletest/include/gtest/internal/gtest-port.h +++ b/googletest/include/gtest/internal/gtest-port.h @@ -1530,7 +1530,7 @@ class ThreadLocal : public ThreadLocalBase { explicit ThreadLocal(const T& value) : default_factory_(new InstanceValueHolderFactory(value)) {} - ~ThreadLocal() { ThreadLocalRegistry::OnThreadLocalDestroyed(this); } + ~ThreadLocal() override { ThreadLocalRegistry::OnThreadLocalDestroyed(this); } T* pointer() { return GetOrCreateValue(); } const T* pointer() const { return GetOrCreateValue(); } @@ -1559,7 +1559,7 @@ class ThreadLocal : public ThreadLocalBase { ->pointer(); } - virtual ThreadLocalValueHolderBase* NewValueForCurrentThread() const { + ThreadLocalValueHolderBase* NewValueForCurrentThread() const override { return default_factory_->MakeNewHolder(); } -- cgit v0.12