module: Make make_config() pure virtual

It is important to implement this method in derived classes. When we
provided default implementation returning NULL, introducing new methods
might leave this method not implemented without a compiler error.

Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
Simon Rozman 2020-02-05 14:25:26 +01:00
parent 6511d826a0
commit e8b1e157d9
3 changed files with 5 additions and 2 deletions

View File

@ -23,7 +23,9 @@
using namespace std;
using namespace winstd;
eap::module g_module;
class module_dummy : public eap::module {
virtual eap::config_method* make_config() { return nullptr; }
} g_module;
static int CredWrite()

View File

@ -20,6 +20,7 @@
#pragma once
#include "../lib/EAPBase/include/Config.h"
#include "../lib/EAPBase/include/Credentials.h"
#include "../lib/EAPBase/include/Module.h"

View File

@ -111,7 +111,7 @@ namespace eap
///
/// \returns New method configuration
///
virtual config_method* make_config();
virtual config_method* make_config() = 0;
/// @}