Make enums scoped

Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
2020-01-04 12:17:16 +01:00
parent 6db816cd60
commit 5a7827e85e
35 changed files with 254 additions and 254 deletions

View File

@@ -90,7 +90,7 @@ namespace eap
///
/// @copydoc eap::config_method::get_method_id()
/// \returns This implementation always returns `winstd::eap_type_legacy_mschapv2`
/// \returns This implementation always returns `winstd::eap_type_t::legacy_mschapv2`
///
virtual winstd::eap_type_t get_method_id() const;
@@ -158,7 +158,7 @@ namespace eap
///
/// @copydoc eap::config_method::get_method_id()
/// \returns This implementation always returns `winstd::eap_type_mschapv2`
/// \returns This implementation always returns `winstd::eap_type_t::mschapv2`
///
virtual winstd::eap_type_t get_method_id() const;

View File

@@ -23,7 +23,7 @@
namespace eap
{
enum chap_packet_code_t : unsigned char;
enum class chap_packet_code_t : unsigned char;
struct WINSTD_NOVTABLE chap_header;
struct WINSTD_NOVTABLE challenge_mschapv2;
struct WINSTD_NOVTABLE challenge_hash;
@@ -65,13 +65,12 @@ namespace eap
/// CHAP packet codes
///
#pragma warning(suppress: 4480)
enum chap_packet_code_t : unsigned char {
chap_packet_code_challenge = 1, ///< Challenge
chap_packet_code_response = 2, ///< Response
chap_packet_code_success = 3, ///< Success
chap_packet_code_failure = 4, ///< Failure
mschapv2_packet_code_change_password = 7, ///< Change password
enum class chap_packet_code_t : unsigned char {
challenge = 1, ///< Challenge
response = 2, ///< Response
success = 3, ///< Success
failure = 4, ///< Failure
change_password = 7, ///< Change password
};

View File

@@ -254,12 +254,12 @@ namespace eap
///
/// Communication phase
///
enum {
phase_unknown = -1, ///< Unknown phase
phase_init = 0, ///< Send client challenge
phase_challenge_server, ///< Verify server challenge
phase_finished, ///< Connection shut down
} m_phase; ///< What phase is our communication at?
enum class phase_t {
unknown = -1, ///< Unknown phase
init = 0, ///< Send client challenge
challenge_server, ///< Verify server challenge
finished, ///< Connection shut down
} m_phase; ///< What phase is our communication at?
};
/// @}