mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Remove superfluous QScopedPointer<>s in singletons
There was a curious pattern of singletons being implemented based on QScopedPointer<>s. This is an unnecessary level of indirection: The lifetime of the smart pointer is the same as that of the pointed-to object. Therefore, replace these pointers by the respective objects. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
4c4222d611
commit
130f109442
6 changed files with 12 additions and 12 deletions
|
@ -18,8 +18,8 @@ void gettextFromC::reset(void)
|
|||
|
||||
gettextFromC *gettextFromC::instance()
|
||||
{
|
||||
static QScopedPointer<gettextFromC> self(new gettextFromC());
|
||||
return self.data();
|
||||
static gettextFromC self;
|
||||
return &self;
|
||||
}
|
||||
|
||||
extern "C" const char *trGettext(const char *text)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue