diff options
author | Gennadiy Civil <gennadiycivil@users.noreply.github.com> | 2017-10-30T14·56-0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-30T14·56-0400 |
commit | 200b5a7cb0fb256ab47c933b3150aed91d9d3470 (patch) | |
tree | 300713d880c593eb36cc6cea4bc8d1073bb03112 /absl/base/internal/malloc_extension.h | |
parent | d5134a7f11e32d11caa67e75ae2ae2e506fb54ba (diff) | |
parent | 0fece732a21c5ae8fef5fa8b3f0b8487bca68d83 (diff) |
Merge branch 'master' into master
Diffstat (limited to 'absl/base/internal/malloc_extension.h')
-rw-r--r-- | absl/base/internal/malloc_extension.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/absl/base/internal/malloc_extension.h b/absl/base/internal/malloc_extension.h index 46b767ff2c3f..75a00ce9a78d 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_; |