From fcf50e1eafee305e3f0bd34064f988a2ac8f5e5d Mon Sep 17 00:00:00 2001 From: wangzhengquan <wangzhengquan85@126.com> Date: 星期一, 24 八月 2020 16:32:40 +0800 Subject: [PATCH] modify iterator --- algorithm/graph.c | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/algorithm/graph.c b/algorithm/graph.c index 6715491..2b15a19 100644 --- a/algorithm/graph.c +++ b/algorithm/graph.c @@ -23,11 +23,16 @@ return *this; } +// bool Figure::contains(const Point& p) const +// { +// auto c = 0; +// for (auto e : edges) if (e.isCorss(p)) c++; +// return c % 2 != 0; +// } + bool Figure::contains(const Point& p) const { - auto c = 0; - for (auto e : edges) if (e.isCorss(p)) c++; - return c % 2 != 0; + return true; } /** -- Gitblit v1.8.0