From 7c95c9ad4f6d63bbc2fd13bbb1554da93bb3cd09 Mon Sep 17 00:00:00 2001 From: pantor Date: Sun, 5 Dec 2021 21:21:48 -0800 Subject: [PATCH] add braces to if function --- include/ruckig/block.hpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/ruckig/block.hpp b/include/ruckig/block.hpp index 8da771fb..866e848b 100644 --- a/include/ruckig/block.hpp +++ b/include/ruckig/block.hpp @@ -134,8 +134,12 @@ class Block { } const Profile& get_profile(double t) const { - if (b && t >= b->right) return b->profile; - if (a && t >= a->right) return a->profile; + if (b && t >= b->right) { + return b->profile; + } + if (a && t >= a->right) { + return a->profile; + } return p_min; }