提交 0c416be3 编写于 作者: A Alexey Milovidov

More simple code; fixed translation error [#CLICKHOUSE-2].

上级 25209bf0
......@@ -31,24 +31,13 @@ public:
bool operator<(const Part & rhs) const
{
if (month != rhs.month)
return month < rhs.month;
if (left != rhs.left)
return left < rhs.left;
if (right != rhs.right)
return right < rhs.right;
if (level != rhs.level)
return level < rhs.level;
return false;
return std::tie(month, left, right, level) < std::tie(rhs.month, rhs.left, rhs.right, rhs.level);
}
/// Contains another part (obtained after combining another part with some other)
/// Contains another part (obtained after merging another part with some other)
bool contains(const Part & rhs) const
{
return month == rhs.month /// Parts for different months are not combined
return month == rhs.month /// Parts for different months are not merged
&& left_date <= rhs.left_date
&& right_date >= rhs.right_date
&& left <= rhs.left
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册