Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix equality issue #46

Merged
merged 1 commit into from
Oct 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ClientNoSqlDB/Indexing/KeyIndex.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public static void RemoveKey(ref PropertyBag bag, object key)

for (var scan = bag; scan != null; scan = scan._next)
{
if (scan._key == key)
if (scan._key.Equals(key))
{
if (prev == null)
bag = scan._next;
Expand All @@ -117,7 +117,7 @@ public static void RemoveKey(ref PropertyBag bag, object key)
public static void SetValue(ref PropertyBag bag, object key, object value)
{
for (var scan = bag; scan != null; scan = scan._next)
if (scan._key == key)
if (scan._key.Equals(key))
{
scan._value = value;
return;
Expand All @@ -129,7 +129,7 @@ public static void SetValue(ref PropertyBag bag, object key, object value)
public static object GetValue(PropertyBag bag, object key)
{
for (var scan = bag; scan != null; scan = scan._next)
if (scan._key == key)
if (scan._key.Equals(key))
return scan._value;

return null;
Expand Down