OverviewFilesCommitsIssuesDocsReleasesPeers

opencog-generate commits / a36bc06

Don't copy the fresh sections
a36bc0620b59eb99feaaaa57bed7c859b5d0106b
by Linas Vepstas <linasvepstas@gmail.com> · 2020-04-21T05:52:14.000Z

Changed files (1) +12 -5

opencog/generate/LinkStyle.cc +12 -5
……@@ -67,7 +67,7 @@ Handle LinkStyle::create_unique_section(const Handle& sect)
6767 Handle usect(_scratch->add_link(SECTION, upoint, disj));
6868
6969 // Record it's original type.
70 _inhsects.emplace_back(createLink(INHERITANCE_LINK, usect, sect));
70 // _inhsects.emplace_back(createLink(INHERITANCE_LINK, upoint, sect));
7171
7272 return usect;
7373}
……@@ -165,8 +165,15 @@ void LinkStyle::clear(void)
165165void LinkStyle::save_work(AtomSpace* as)
166166{
167167 for (const Handle& h : _mempoints)
168 as->add_atom(h);
169
170 for (const Handle& h : _inhsects)
171 as->add_atom(h);
168 {
169 Handle pt(as->add_atom(h));
170
171#if FINISH_ME_LATER
172 // Link tying together the fully-connected piece, and the
173 // puzzle piece it came from.
174 IncomingSet iset = pt->get_incoming_by_type(SECTION, as);
175 OC_ASSERT(1 == iset.size(), "Wrong number of sections");
176 as
177#endif
178 }
172179}