You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by mm...@apache.org on 2018/10/10 01:03:35 UTC
[pulsar] branch master updated: [c++] Fixed virtual destructors
(#2754)
This is an automated email from the ASF dual-hosted git repository.
mmerli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/master by this push:
new 8d396c3 [c++] Fixed virtual destructors (#2754)
8d396c3 is described below
commit 8d396c347b7c9b275066b885554060d771dd17f6
Author: Matteo Merli <mm...@apache.org>
AuthorDate: Tue Oct 9 18:03:31 2018 -0700
[c++] Fixed virtual destructors (#2754)
---
pulsar-client-cpp/include/pulsar/CryptoKeyReader.h | 2 +-
pulsar-client-cpp/include/pulsar/Logger.h | 2 ++
pulsar-client-cpp/include/pulsar/TopicMetadata.h | 2 ++
pulsar-client-cpp/lib/Hash.h | 2 ++
4 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/pulsar-client-cpp/include/pulsar/CryptoKeyReader.h b/pulsar-client-cpp/include/pulsar/CryptoKeyReader.h
index cb4cf15..7edb58e 100644
--- a/pulsar-client-cpp/include/pulsar/CryptoKeyReader.h
+++ b/pulsar-client-cpp/include/pulsar/CryptoKeyReader.h
@@ -28,7 +28,7 @@ namespace pulsar {
class CryptoKeyReader {
public:
- CryptoKeyReader() {}
+ virtual ~CryptoKeyReader() {}
/*
* Return the encryption key corresponding to the key name in the argument
diff --git a/pulsar-client-cpp/include/pulsar/Logger.h b/pulsar-client-cpp/include/pulsar/Logger.h
index e319a04..0d9ce44 100644
--- a/pulsar-client-cpp/include/pulsar/Logger.h
+++ b/pulsar-client-cpp/include/pulsar/Logger.h
@@ -34,6 +34,8 @@ class Logger {
ERROR = 3
};
+ virtual ~Logger() {}
+
virtual bool isEnabled(Level level) = 0;
virtual void log(Level level, int line, const std::string& message) = 0;
diff --git a/pulsar-client-cpp/include/pulsar/TopicMetadata.h b/pulsar-client-cpp/include/pulsar/TopicMetadata.h
index 6413e2b..6547333 100644
--- a/pulsar-client-cpp/include/pulsar/TopicMetadata.h
+++ b/pulsar-client-cpp/include/pulsar/TopicMetadata.h
@@ -27,6 +27,8 @@ namespace pulsar {
*/
class TopicMetadata {
public:
+ virtual ~TopicMetadata() {}
+
virtual int getNumPartitions() const = 0;
};
} // namespace pulsar
diff --git a/pulsar-client-cpp/lib/Hash.h b/pulsar-client-cpp/lib/Hash.h
index f278478..367e661 100644
--- a/pulsar-client-cpp/lib/Hash.h
+++ b/pulsar-client-cpp/lib/Hash.h
@@ -25,6 +25,8 @@
namespace pulsar {
class Hash {
public:
+ virtual ~Hash() {}
+
/**
* Generate the hash of a given String
*