diff options
Diffstat (limited to 'src/emoji.cpp')
-rw-r--r-- | src/emoji.cpp | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/src/emoji.cpp b/src/emoji.cpp index 34a6cf0..47b003d 100644 --- a/src/emoji.cpp +++ b/src/emoji.cpp @@ -1917,20 +1917,10 @@ EmojiEntityMapper::~EmojiEntityMapper() } /** Returns the one and only instance of the Emoji entity mapper */ -EmojiEntityMapper *EmojiEntityMapper::instance() +EmojiEntityMapper &EmojiEntityMapper::instance() { - if (s_instance==0) - { - s_instance = new EmojiEntityMapper; - } - return s_instance; -} - -/** Deletes the one and only instance of the Emoji entity mapper */ -void EmojiEntityMapper::deleteInstance() -{ - delete s_instance; - s_instance=0; + static EmojiEntityMapper inst; + return inst; } /*! |