Commit 1cbd83de authored by NexAdn's avatar NexAdn
Browse files

Remove templates from predicates, use real parameter types instead

parent 79941b13
......@@ -74,27 +74,23 @@ inline void print_debug(std::string message)
{}
#endif
template <typename T>
inline bool is_acknowledged(T object)
inline bool is_acknowledged(json object)
{
return object["attrs"]["acknowledgement"] > 0;
}
template <typename T>
inline bool is_in_downtime(T object)
inline bool is_in_downtime(json object)
{
return object["attrs"]["downtime_depth"] > 0;
}
template <typename T>
inline bool ignored_by_config(T object)
inline bool ignored_by_config(json object)
{
return object["attrs"]["vars"]["ampel_disable"] != nullptr
&& object["attrs"]["vars"]["ampel_disable"];
}
template <typename T>
inline bool is_in_soft_state(T object)
inline bool is_in_soft_state(json object)
{
return object["attrs"]["state_type"] == 0;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment