summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Base')
-rw-r--r--Swiften/Base/IDGenerator.cpp3
-rw-r--r--Swiften/Base/IDGenerator.h5
-rw-r--r--Swiften/Base/SimpleIDGenerator.cpp3
-rw-r--r--Swiften/Base/SimpleIDGenerator.h6
4 files changed, 13 insertions, 4 deletions
diff --git a/Swiften/Base/IDGenerator.cpp b/Swiften/Base/IDGenerator.cpp
index 5aa471c..b59a39c 100644
--- a/Swiften/Base/IDGenerator.cpp
+++ b/Swiften/Base/IDGenerator.cpp
@@ -16,6 +16,9 @@ namespace Swift {
IDGenerator::IDGenerator() {
}
+IDGenerator::~IDGenerator() {
+}
+
std::string IDGenerator::generateID() {
static boost::uuids::random_generator generator;
return boost::lexical_cast<std::string>(generator());
diff --git a/Swiften/Base/IDGenerator.h b/Swiften/Base/IDGenerator.h
index d1b5964..6b53994 100644
--- a/Swiften/Base/IDGenerator.h
+++ b/Swiften/Base/IDGenerator.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -14,7 +14,8 @@ namespace Swift {
class SWIFTEN_API IDGenerator {
public:
IDGenerator();
+ virtual ~IDGenerator();
- std::string generateID();
+ virtual std::string generateID();
};
}
diff --git a/Swiften/Base/SimpleIDGenerator.cpp b/Swiften/Base/SimpleIDGenerator.cpp
index 072dd39..e6d72b3 100644
--- a/Swiften/Base/SimpleIDGenerator.cpp
+++ b/Swiften/Base/SimpleIDGenerator.cpp
@@ -11,6 +11,9 @@ namespace Swift {
SimpleIDGenerator::SimpleIDGenerator() {
}
+SimpleIDGenerator::~SimpleIDGenerator() {
+}
+
std::string SimpleIDGenerator::generateID() {
bool carry = true;
size_t i = 0;
diff --git a/Swiften/Base/SimpleIDGenerator.h b/Swiften/Base/SimpleIDGenerator.h
index 49ba59e..ff645b1 100644
--- a/Swiften/Base/SimpleIDGenerator.h
+++ b/Swiften/Base/SimpleIDGenerator.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2015 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -10,6 +10,7 @@
#include <Swiften/Base/API.h>
#include <Swiften/Base/IDGenerator.h>
+#include <Swiften/Base/Override.h>
namespace Swift {
@@ -21,8 +22,9 @@ namespace Swift {
class SWIFTEN_API SimpleIDGenerator : public IDGenerator {
public:
SimpleIDGenerator();
+ ~SimpleIDGenerator();
- std::string generateID();
+ std::string generateID() SWIFTEN_OVERRIDE;
private:
std::string currentID;