rename get_instance function
This commit is contained in:
@@ -94,7 +94,7 @@ auto main(int argc, char *argv[]) -> int
|
|||||||
}
|
}
|
||||||
|
|
||||||
{// ex: singleton
|
{// ex: singleton
|
||||||
test_singleton::get_instance().print();
|
test_singleton::instance().print();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ namespace hack::utils
|
|||||||
template<typename T>
|
template<typename T>
|
||||||
struct singleton : public no_move, no_copy
|
struct singleton : public no_move, no_copy
|
||||||
{
|
{
|
||||||
static T& get_instance()
|
static T& instance()
|
||||||
{
|
{
|
||||||
static T t;
|
static T t;
|
||||||
return t;
|
return t;
|
||||||
|
|||||||
Reference in New Issue
Block a user