diff options
| author | 2020-02-06 11:25:42 +0000 | |
|---|---|---|
| committer | 2020-02-06 11:25:42 +0000 | |
| commit | 98e4ddfb21d285c8b675788c155bb204822fbd4a (patch) | |
| tree | 030eb18c989bf3c9e4768a538796e3221ca7934e /src/modules/extra/m_ldap.cpp | |
| parent | In C++11 [io]fstream has std::string constructors; use them. (diff) | |
| download | inspircd++-98e4ddfb21d285c8b675788c155bb204822fbd4a.tar.gz inspircd++-98e4ddfb21d285c8b675788c155bb204822fbd4a.tar.bz2 inspircd++-98e4ddfb21d285c8b675788c155bb204822fbd4a.zip | |
Use C++11 inline initialisation for class members.
Diffstat (limited to 'src/modules/extra/m_ldap.cpp')
| -rw-r--r-- | src/modules/extra/m_ldap.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/modules/extra/m_ldap.cpp b/src/modules/extra/m_ldap.cpp index 6dfd575e9..46b76ab5f 100644 --- a/src/modules/extra/m_ldap.cpp +++ b/src/modules/extra/m_ldap.cpp @@ -54,16 +54,14 @@ class LDAPRequest public: LDAPService* service; LDAPInterface* inter; - LDAPMessage* message; /* message returned by ldap_ */ - LDAPResult* result; /* final result */ + LDAPMessage* message = nullptr; /* message returned by ldap_ */ + LDAPResult* result = nullptr; /* final result */ struct timeval tv; QueryType type; LDAPRequest(LDAPService* s, LDAPInterface* i) : service(s) , inter(i) - , message(NULL) - , result(NULL) { type = QUERY_UNKNOWN; tv.tv_sec = 0; @@ -183,9 +181,9 @@ class LDAPCompare : public LDAPRequest class LDAPService : public LDAPProvider, public SocketThread { - LDAP* con; + LDAP* con = nullptr; reference<ConfigTag> config; - time_t last_connect; + time_t last_connect = 0; int searchscope; time_t timeout; @@ -275,7 +273,7 @@ class LDAPService : public LDAPProvider, public SocketThread LDAPService(Module* c, ConfigTag* tag) : LDAPProvider(c, "LDAP/" + tag->getString("id")) - , con(NULL), config(tag), last_connect(0) + , config(tag) { std::string scope = config->getString("searchscope"); if (stdalgo::string::equalsci(scope, "base")) |
