aboutsummaryrefslogtreecommitdiff
path: root/absl/base/internal/malloc_extension.h
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2017-10-26 11:22:13 -0700
committerJon Cohen <cohenjon@google.com>2017-10-27 10:47:50 -0400
commit0fece732a21c5ae8fef5fa8b3f0b8487bca68d83 (patch)
treeb90d490f865b76e50c5710b0621359aa0f2771e7 /absl/base/internal/malloc_extension.h
parentdedb4eec6cf0addc26cc27b67c270aa5a478fcc5 (diff)
downloadabseil-0fece732a21c5ae8fef5fa8b3f0b8487bca68d83.tar.gz
abseil-0fece732a21c5ae8fef5fa8b3f0b8487bca68d83.tar.bz2
abseil-0fece732a21c5ae8fef5fa8b3f0b8487bca68d83.zip
Changes imported from Abseil "staging" branch:
- 5b675ef65e4977b3ac778a75a21e99db1ebe78e7 Remove "not an official google project" disclaimer. by Abseil Team <absl-team@google.com> - 77d2aacc03efe6841612b38bcbb745dde1ad7d3e Avoid weak virtual table warnings (-Wweak-vtables) and re... by Abseil Team <absl-team@google.com> GitOrigin-RevId: 5b675ef65e4977b3ac778a75a21e99db1ebe78e7 Change-Id: Ia0d1d6e39169c7ad9783d25dc92dad041de3a966
Diffstat (limited to 'absl/base/internal/malloc_extension.h')
-rw-r--r--absl/base/internal/malloc_extension.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/absl/base/internal/malloc_extension.h b/absl/base/internal/malloc_extension.h
index 46b767ff..75a00ce9 100644
--- a/absl/base/internal/malloc_extension.h
+++ b/absl/base/internal/malloc_extension.h
@@ -388,6 +388,9 @@ class MallocExtensionWriter {
MallocExtensionWriter() {}
MallocExtensionWriter(const MallocExtensionWriter&) = delete;
MallocExtensionWriter& operator=(const MallocExtensionWriter&) = delete;
+
+ private:
+ virtual void UnusedKeyMethod(); // Dummy key method to avoid weak vtable.
};
// A subclass that writes to the std::string "out". NOTE: The generated
@@ -396,9 +399,7 @@ class MallocExtensionWriter {
class StringMallocExtensionWriter : public MallocExtensionWriter {
public:
explicit StringMallocExtensionWriter(std::string* out) : out_(out) {}
- virtual void Write(const char* buf, int len) {
- out_->append(buf, len);
- }
+ void Write(const char* buf, int len) override;
private:
std::string* const out_;