Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHieu Hoang <hieu@hoang.co.uk>2013-05-29 21:16:15 +0400
committerHieu Hoang <hieu@hoang.co.uk>2013-05-29 21:16:15 +0400
commit6249432407af8730c10bccc7894c0725fcaf5e47 (patch)
tree3ac1f094b9fdc199b04bc5ef209ce00e3596e37d /mert/Singleton.h
parent59bd7deb4b6b9c4f7b3b7dbb055783528fbc31ca (diff)
beautify
Diffstat (limited to 'mert/Singleton.h')
-rw-r--r--mert/Singleton.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/mert/Singleton.h b/mert/Singleton.h
index 473517170..f50925fa4 100644
--- a/mert/Singleton.h
+++ b/mert/Singleton.h
@@ -5,13 +5,14 @@
namespace MosesTuning
{
-
+
// thread *un*safe singleton.
// TODO: replace this with thread-safe singleton.
template <typename T>
-class Singleton {
- public:
+class Singleton
+{
+public:
static T* GetInstance() {
if (m_instance == NULL) {
m_instance = new T;
@@ -26,7 +27,7 @@ class Singleton {
}
}
- private:
+private:
Singleton();
static T* m_instance;
};