Skip to content

Commit

Permalink
Forgot pragma once.
Browse files Browse the repository at this point in the history
And used ROS clang-format.
  • Loading branch information
lewie-donckers committed Feb 15, 2022
1 parent 6dfa6da commit 1c6b7f8
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/common.hpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
#pragma once

#include <type_traits>

namespace path_tracking_pid {
namespace path_tracking_pid
{

// Converts an enumeration to its underlying type.
template<typename enum_type>
template <typename enum_type>
constexpr std::underlying_type_t<enum_type> to_underlying(enum_type value) noexcept
{
return static_cast<std::underlying_type_t<enum_type>>(value);
return static_cast<std::underlying_type_t<enum_type>>(value);
}

} // namespace path_tracking_pid
} // namespace path_tracking_pid

0 comments on commit 1c6b7f8

Please sign in to comment.