lg2: use direct enum conversion
lg2 now has the ability to directly convert enums for which there is
not any other conversion. Leverage that to simplify the code.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I22004dacf7171882d8219aa3dd09d87044da4db6
diff --git a/src/button_handler.cpp b/src/button_handler.cpp
index 36ed096..2d1f1eb 100755
--- a/src/button_handler.cpp
+++ b/src/button_handler.cpp
@@ -294,8 +294,7 @@
default:
{
lg2::error("{EVENT} is invalid power event. skipping...", "EVENT",
- static_cast<std::underlying_type_t<PowerEvent>>(
- powerEventType));
+ powerEventType);
return;
}