Normalize C/C++ include guards
[babeltrace.git] / src / cpp-common / bt2c / fmt.hpp
index 4633ebca73b03233e1cc2c9ec7e9df120c66d463..f29a77a209484827ef0002c3e43494712e909e95 100644 (file)
@@ -4,8 +4,9 @@
  * SPDX-License-Identifier: MIT
  */
 
-#include "common/common.h"
-#include "cpp-common/bt2/message.hpp"
+#ifndef BABELTRACE_CPP_COMMON_BT2C_FMT_HPP
+#define BABELTRACE_CPP_COMMON_BT2C_FMT_HPP
+
 #include "cpp-common/vendor/fmt/format.h" /* IWYU pragma: keep */
 #include "cpp-common/vendor/wise-enum/wise_enum.h"
 
@@ -15,7 +16,7 @@ namespace internal {
 
 template <typename T>
 using EnableIfIsWiseEnum =
-    typename std::enable_if<wise_enum::is_wise_enum<T>::value, const char *>::type;
+    typename std::enable_if<wise_enum::is_wise_enum<T>::value, wise_enum::string_type>::type;
 
 } /* namespace internal */
 
@@ -27,11 +28,6 @@ template <typename T>
     return wise_enum::to_string<T>(val);
 }
 
-inline const char *format_as(const MessageType type)
-{
-    return bt_common_message_type_string(static_cast<bt_message_type>(type));
-}
-
 } /* namespace bt2 */
 
 namespace bt2c {
@@ -48,3 +44,5 @@ inline std::string format_as(const UuidView uuid)
 }
 
 } /* namespace bt2c */
+
+#endif /* BABELTRACE_CPP_COMMON_BT2C_FMT_HPP */
This page took 0.030521 seconds and 4 git commands to generate.