linksplatform / Data.Doublets

LinksPlatform's Platform.Data.Doublets Class Library
https://linksplatform.github.io/Data.Doublets/
The Unlicense
14 stars 6 forks source link

Repair Count logic #359

Open Konard opened 2 years ago

Konard commented 2 years ago

https://github.com/linksplatform/Data.Doublets/blob/86197375ad05039154d0c706d070b5e2a2cfed5a/csharp/Platform.Data.Doublets/Memory/Split/Generic/SplitMemoryLinksBase.cs#L491-L503

if (AreEqual(source, any))
{
  if (AreEqual(storedLinkValue.Target, target))
  {
      return GetOne();
  }
}
if (AreEqual(target, any))
{
  if (AreEqual(storedLinkValue.Source, source))
  {
      return GetOne();
  }
}
return GetZero();

Note that this should also affect C++ code base. As @uselessgoddess told me, it is already fixed in Rust code base.

uselessgoddess commented 2 years ago

This also applies to Each