diff --git a/cd_utils/cdutils_types.cpp b/cd_utils/cdutils_types.cpp index 65e63a0..88b4c2a 100644 --- a/cd_utils/cdutils_types.cpp +++ b/cd_utils/cdutils_types.cpp @@ -67,9 +67,9 @@ CDType & CDType::operator =(double x) { val += avg_h[i]; val /= avg_h.size(); avg_h.clear(); + if (history.size() < cd_x_history_max_size) + history << val; } - if (history.size() < cd_x_history_max_size) - history << val; } return *this; }