clang-format
This commit is contained in:
parent
e1a09e48c4
commit
2044fa25c6
2 changed files with 4 additions and 3 deletions
|
@ -45,6 +45,7 @@ class MAPNIK_DECL datasource_cache : public singleton_cxx11<datasource_cache>,
|
||||||
private util::noncopyable
|
private util::noncopyable
|
||||||
{
|
{
|
||||||
friend class singleton_cxx11<datasource_cache>;
|
friend class singleton_cxx11<datasource_cache>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
bool plugin_registered(const std::string& plugin_name) const;
|
bool plugin_registered(const std::string& plugin_name) const;
|
||||||
std::vector<std::string> plugin_names() const;
|
std::vector<std::string> plugin_names() const;
|
||||||
|
|
|
@ -65,19 +65,19 @@ class CreateStatic
|
||||||
template<typename T>
|
template<typename T>
|
||||||
class singleton_cxx11
|
class singleton_cxx11
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static T& instance()
|
static T& instance()
|
||||||
{
|
{
|
||||||
static T instance;
|
static T instance;
|
||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
protected:
|
|
||||||
|
protected:
|
||||||
#ifdef MAPNIK_THREADSAFE
|
#ifdef MAPNIK_THREADSAFE
|
||||||
static std::mutex mutex_;
|
static std::mutex mutex_;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
template<typename T, template<typename U> class CreatePolicy = CreateStatic>
|
template<typename T, template<typename U> class CreatePolicy = CreateStatic>
|
||||||
class MAPNIK_DECL singleton
|
class MAPNIK_DECL singleton
|
||||||
|
|
Loading…
Reference in a new issue