mirror of
https://github.com/taglib/taglib.git
synced 2025-06-04 01:28:21 -04:00
Hide a private static variable.
This is so-called Scott Mayers' singleton pattern.
This commit is contained in:
parent
e44de9f37f
commit
25ffbcb4b9
@ -71,14 +71,13 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
FrameFactory FrameFactory::factory;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// public members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
FrameFactory *FrameFactory::instance()
|
||||
{
|
||||
static FrameFactory factory;
|
||||
return &factory;
|
||||
}
|
||||
|
||||
@ -519,5 +518,4 @@ void FrameFactory::updateGenre(TextIdentificationFrame *frame) const
|
||||
fields.append(String());
|
||||
|
||||
frame->setText(newfields);
|
||||
|
||||
}
|
||||
|
@ -66,6 +66,7 @@ namespace TagLib {
|
||||
{
|
||||
public:
|
||||
static FrameFactory *instance();
|
||||
|
||||
/*!
|
||||
* Create a frame based on \a data. \a synchSafeInts should only be set
|
||||
* false if we are parsing an old tag (v2.3 or older) that does not support
|
||||
@ -162,8 +163,6 @@ namespace TagLib {
|
||||
|
||||
void updateGenre(TextIdentificationFrame *frame) const;
|
||||
|
||||
static FrameFactory factory;
|
||||
|
||||
class FrameFactoryPrivate;
|
||||
FrameFactoryPrivate *d;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user