Skip to content

Commit b0de51d

Browse files
committed
Upgrades BtnFind
1 parent 94caa4d commit b0de51d

File tree

5 files changed

+34
-24
lines changed

5 files changed

+34
-24
lines changed

FriendlyCSharp.Databases/BTreeN/FcsBTreeN.cs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -446,13 +446,16 @@ public virtual void BtnDeleteAll(bool bRunGC)
446446
btnFast = default(KeyValueFast);
447447
bNullResult = new bool?(true);
448448
}
449-
if (kvPage.kvPageNextRight == null)
450-
QQ = null;
451-
else if (high > 0)
452-
QQ = kvPage.kvPageNextRight[high]; // right
453449
else
454-
QQ = kvPage.kvPageNextRight[0]; // left
455-
bNullResult = _BtnFind(ref key, out value, QQ, out btnFast);
450+
{
451+
if (kvPage.kvPageNextRight == null)
452+
QQ = null;
453+
else if (high > 0)
454+
QQ = kvPage.kvPageNextRight[high]; // right
455+
else
456+
QQ = kvPage.kvPageNextRight[0]; // left
457+
bNullResult = _BtnFind(ref key, out value, QQ, out btnFast);
458+
}
456459
}
457460
return bNullResult;
458461
}

FriendlyCSharp.Databases/BTreeN/FcsDuplValueFastBTreeN.cs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -436,13 +436,16 @@ public virtual void BtnDeleteAll(bool bRunGC)
436436
btnFast = default(DuplValueFast);
437437
bNullResult = new bool?(true);
438438
}
439-
if (kvPage.kvPageNextRight == null)
440-
QQ = null;
441-
else if (high <= 0)
442-
QQ = kvPage.kvPageNextRight[0]; // left
443439
else
444-
QQ = kvPage.kvPageNextRight[high]; // right
445-
bNullResult = _BtnFind(ref key, out value, QQ, out btnFast);
440+
{
441+
if (kvPage.kvPageNextRight == null)
442+
QQ = null;
443+
else if (high <= 0)
444+
QQ = kvPage.kvPageNextRight[0]; // left
445+
else
446+
QQ = kvPage.kvPageNextRight[high]; // right
447+
bNullResult = _BtnFind(ref key, out value, QQ, out btnFast);
448+
}
446449
}
447450
return bNullResult;
448451
}

FriendlyCSharp.Databases/BTreeN/FcsKeyFastBTreeN.cs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -456,13 +456,16 @@ public virtual void BtnDeleteAll(bool bRunGC)
456456
btnFast = default(KeyFast);
457457
bNullResult = new bool?(true);
458458
}
459-
if (keyPage.kvPageNextRight == null)
460-
QQ = null;
461-
else if (high > 0)
462-
QQ = keyPage.kvPageNextRight[high]; // right
463459
else
464-
QQ = keyPage.kvPageNextRight[0]; // left
465-
bNullResult = _BtnFind(ref key, QQ, out btnFast, findCmp);
460+
{
461+
if (keyPage.kvPageNextRight == null)
462+
QQ = null;
463+
else if (high > 0)
464+
QQ = keyPage.kvPageNextRight[high]; // right
465+
else
466+
QQ = keyPage.kvPageNextRight[0]; // left
467+
bNullResult = _BtnFind(ref key, QQ, out btnFast, findCmp);
468+
}
466469
}
467470
return bNullResult;
468471
}

FriendlyCSharp.Databases/FriendlyCSharp.Databases.csproj

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,15 @@
1313

1414
The B-tree is a generalization of a binary search tree in that a node can have more than two children (Comer 1979, p. 123). Unlike self-balancing binary search trees, the B-tree is optimized for systems that read and write large blocks of data.
1515
</Description>
16-
<PackageReleaseNotes>Upgrades with news NETStandard.Library 2.0.2 - FcsKeyFastBTreeN and FcsInmemStream are serialized by binary formatting</PackageReleaseNotes>
16+
<PackageReleaseNotes>Upgrades BtnFind</PackageReleaseNotes>
1717
</PropertyGroup>
1818

1919
<PropertyGroup>
2020
<TargetFramework>netstandard2.0</TargetFramework>
21-
<Version>2.0.2</Version>
22-
<AssemblyVersion>2.0.2.0</AssemblyVersion>
23-
<FileVersion>2.0.2.0</FileVersion>
21+
<Version>2.0.3</Version>
22+
<AssemblyVersion>2.0.3.0</AssemblyVersion>
23+
<FileVersion>2.0.3.0</FileVersion>
24+
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
2425
</PropertyGroup>
2526

2627
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">

FriendlyCSharp.Databases/Storage/FcsInmemStream.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -743,9 +743,9 @@ public virtual int ReadNoLock(TImsId offset, T[] aValue, TImsId[] aDel, int inde
743743
{
744744
if (aValue == null)
745745
throw new ArgumentOutOfRangeException(nameof(aValue));
746-
if ((index < 0) || (index >= aValue.Length) || (index >= aDel.Length))
746+
if ((index < 0) || (index >= aValue.Length))
747747
throw new ArgumentOutOfRangeException(nameof(index));
748-
if ((count == 0) || (count + index > aValue.Length) || (count + index > aDel.Length))
748+
if ((count == 0) || (count + index > aValue.Length))
749749
throw new ArgumentOutOfRangeException(nameof(count));
750750
}
751751

0 commit comments

Comments
 (0)