diff options
author | Attila Molnar <attilamolnar@hush.com> | 2014-06-24 12:08:20 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2014-06-24 12:08:20 +0200 |
commit | 3a921efb0bd049eb8cccfcc205ebb260c78b423a (patch) | |
tree | d2e7c4cf98d7899f4cc4a9e7de5b18da03ac4581 | |
parent | 5043a2f83598baa3afba53201f690e6deac3eafd (diff) |
Add the fakederef class
-rw-r--r-- | include/inspircd.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/inspircd.h b/include/inspircd.h index dab00d31c..4850d5a03 100644 --- a/include/inspircd.h +++ b/include/inspircd.h @@ -50,6 +50,17 @@ CoreExport extern InspIRCd* ServerInstance; +/** Base class for manager classes that are still accessed using -> but are no longer pointers + */ +template <typename T> +struct fakederef +{ + T* operator->() + { + return static_cast<T*>(this); + } +}; + #include "config.h" #include "dynref.h" #include "consolecolors.h" |