Module: check_mk
Branch: master
Commit: 1718b82374ecb78854b658f874a3e897d8bc080a
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1718b82374ecb7…
Author: Jukka Aro <ja(a)mathias-kettner.de>
Date: Fri Mar 23 13:55:35 2018 +0100
Win-agent: use strongly typed enums, part 1
Convert EventLogRecordVista::WinEventLevel.
---
agents/windows/EventLogVista.cc | 4 ++--
agents/windows/build_version | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/agents/windows/EventLogVista.cc b/agents/windows/EventLogVista.cc
index 09c87cc..769c9c7 100644
--- a/agents/windows/EventLogVista.cc
+++ b/agents/windows/EventLogVista.cc
@@ -35,7 +35,7 @@
/////////////////////////////////////////////////////////////
class EventLogRecordVista : public IEventLogRecord {
- enum WinEventLevel {
+ enum class WinEventLevel {
Audit = 0,
Critical = 1,
Error = 2,
@@ -133,7 +133,7 @@ public:
virtual Level level() const override {
const EVT_VARIANT *values =
reinterpret_cast<const EVT_VARIANT *>(&_buffer[0]);
- switch (values[4].ByteVal) {
+ switch (static_cast<WinEventLevel>(values[4].ByteVal)) {
case WinEventLevel::Error:
case WinEventLevel::Critical:
return Level::Error;
diff --git a/agents/windows/build_version b/agents/windows/build_version
index a6981b3..78f6630 100644
--- a/agents/windows/build_version
+++ b/agents/windows/build_version
@@ -1 +1 @@
-3200
+3202