Skip to content

Commit

Permalink
Merge pull request #46 from vb2ae/object_equals
Browse files Browse the repository at this point in the history
fix equality issue
  • Loading branch information
vb2ae authored Oct 23, 2023
2 parents b9e5d91 + 5d5642d commit 7d078ed
Showing 1 changed file with 3 additions and 3 deletions.
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

0 comments on commit 7d078ed

Please # to comment.