Skip to content

Commit 64c6a75

Browse files
committed
Core (LV::Singleton): Add const_instance() to return instance as const.
1 parent 0e2a015 commit 64c6a75

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

libvisual/libvisual/lv_singleton.hpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,14 @@ namespace LV {
3131
return m_instance.get ();
3232
}
3333

34+
//! Returns the singleton instance as const.
35+
//!
36+
//! @return Singleton instance.
37+
static T const* const_instance ()
38+
{
39+
return m_instance.get ();
40+
}
41+
3442
//! Destroys the singleton instance
3543
static void destroy ()
3644
{

0 commit comments

Comments
 (0)