Gui: simplify singleton of PropertyItemFactory

This commit is contained in:
wmayer
2024-04-23 10:28:50 +02:00
committed by wwmayer
parent 1c39969061
commit 68bfbd0707
2 changed files with 2 additions and 15 deletions

View File

@@ -82,20 +82,10 @@ float fromPercent(int value)
}
Gui::PropertyEditor::PropertyItemFactory* Gui::PropertyEditor::PropertyItemFactory::_singleton = nullptr;
PropertyItemFactory& PropertyItemFactory::instance()
{
if (!_singleton) {
_singleton = new PropertyItemFactory;
}
return *_singleton;
}
void PropertyItemFactory::destruct ()
{
delete _singleton;
_singleton = nullptr;
static PropertyItemFactory inst;
return inst;
}
PropertyItem* PropertyItemFactory::createPropertyItem (const char* sName) const