Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

first pass at readonly / static cleanup #905

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
nits
  • Loading branch information
mgravell committed Mar 28, 2024
commit 9c5b22f21565af0160fc67cf36c0917325612772
3 changes: 2 additions & 1 deletion cs/src/core/Async/AsyncOperationInternal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 62,8 @@ internal sealed class AsyncOperationInternal<Input, Output, Context, TAsyncOpera
ExceptionDispatchInfo _exception;
readonly FasterKV<Key, Value> _fasterKV;
readonly IFasterSession<Key, Value, Input, Output, Context> _fasterSession;
readonly TAsyncOperation _asyncOperation;
[System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE0044:Add readonly modifier", Justification = "Possible call side-effects?")]
TAsyncOperation _asyncOperation;
PendingContext<Input, Output, Context> _pendingContext;
int CompletionComputeStatus;

Expand Down
1 change: 1 addition & 0 deletions cs/src/core/Index/FASTER/FASTERBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 380,7 @@ internal void Free()
overflowBucketsAllocator.Dispose();
}

[System.Diagnostics.CodeAnalysis.SuppressMessage("Performance", "CA1822:Mark members as static", Justification = "stateful on down-level")]
private void Free(int version)
{
#if !NET5_0_OR_GREATER
Expand Down
2 changes: 1 addition & 1 deletion cs/src/core/Utilities/BufferPool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 58,7 @@ public unsafe sealed class SectorAlignedMemory
/// </summary>
public int available_bytes;

private int level;
private readonly int level;
internal int Level => this.level
#if CHECK_FREE
& ~kFreeBitMask
Expand Down