Skip to content

Commit

Permalink
SWEEP: Reviewed all applications of .GetAndAdd() methods from atomic …
Browse files Browse the repository at this point in the history
…numeric classes
  • Loading branch information
NightOwl888 committed Mar 10, 2024
1 parent aa7a267 commit a47a11a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Lucene.Net.TestFramework/Store/MockDirectoryWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ public override IndexOutput CreateOutput(string name, IOContext context)
{
if (existing != null)
{
ramdir.m_sizeInBytes.AddAndGet(-existing.GetSizeInBytes()); // LUCENENET: GetAndAdd in Lucene, but we are not using the value
ramdir.m_sizeInBytes.GetAndAdd(-existing.GetSizeInBytes());
existing.directory = null;
}
ramdir.m_fileMap[name] = file;
Expand Down Expand Up @@ -1558,4 +1558,4 @@ protected FakeIOException(SerializationInfo info, StreamingContext context)
}
#endif
}
}
}
2 changes: 1 addition & 1 deletion src/Lucene.Net.Tests/Search/TestBooleanOr.cs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ public virtual void TestBooleanScorerMax()
while (end.Value < docCount)
{
int inc = TestUtil.NextInt32(Random, 1, 1000);
end.AddAndGet(inc);
end.GetAndAdd(inc);
scorer.Score(c, end);
}

Expand Down

0 comments on commit a47a11a

Please sign in to comment.