summaryrefslogtreecommitdiff
path: root/include/config.h
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2025-03-02 14:51:02 +0000
committerSadie Powell <sadie@witchery.services>2025-03-02 15:27:47 +0000
commitf9911dde529adf3dc03f4f14bbd70756ac2f665c (patch)
tree7c720e4f82fdb30b7d8a22fc0809f50bc862fae3 /include/config.h
parenta5e5eb5eb084e8343260ce7bc26ea86798f64fe1 (diff)
Return references instead of pointers from the config system.
We used to return NULL from these methods but now we return an empty block so this can never actually be null now.
Diffstat (limited to 'include/config.h')
-rw-r--r--include/config.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/config.h b/include/config.h
index 2f4f1b953..d705fd422 100644
--- a/include/config.h
+++ b/include/config.h
@@ -41,7 +41,7 @@ namespace Configuration
Block(const Anope::string &);
const Anope::string &GetName() const;
int CountBlock(const Anope::string &name) const;
- const Block *GetBlock(const Anope::string &name, int num = 0) const;
+ const Block &GetBlock(const Anope::string &name, int num = 0) const;
Block *GetMutableBlock(const Anope::string &name, int num = 0);
template<typename T> T Get(const Anope::string &tag, const Anope::string &def = "") const
@@ -126,12 +126,12 @@ namespace Configuration
void LoadConf(File &file);
void Post(Conf *old);
- Block *GetModule(const Module *);
- Block *GetModule(const Anope::string &name);
+ Block &GetModule(const Module *);
+ Block &GetModule(const Anope::string &name);
BotInfo *GetClient(const Anope::string &name);
- const Block *GetCommand(CommandSource &);
+ const Block &GetCommand(CommandSource &);
};
struct Uplink final