Skip to content

Commit

Permalink
Style: brace placement
Browse files Browse the repository at this point in the history
  • Loading branch information
pitrou committed Sep 27, 2023
1 parent fe4f899 commit 78c5c4f
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 8 deletions.
6 changes: 4 additions & 2 deletions csharp/src/Apache.Arrow/C/CArrowArray.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,10 @@ public static void Free(CArrowArray* array)
/// <summary>
/// Call the array's release func, if set.
/// </summary>
public static void CallReleaseFunc(CArrowArray* array) {
if (array->release != default) {
public static void CallReleaseFunc(CArrowArray* array)
{
if (array->release != default)
{
// Call release if not already called.
#if NET5_0_OR_GREATER
array->release(array);
Expand Down
3 changes: 2 additions & 1 deletion csharp/src/Apache.Arrow/C/CArrowArrayExporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,8 @@ private unsafe static void ReleaseArray(CArrowArray* cArray)
{
CArrowArray.CallReleaseFunc(cArray->children[i]);
}
if (cArray->dictionary != null) {
if (cArray->dictionary != null)
{
CArrowArray.CallReleaseFunc(cArray->dictionary);
}
DisposePrivateData(&cArray->private_data);
Expand Down
3 changes: 2 additions & 1 deletion csharp/src/Apache.Arrow/C/CArrowSchemaImporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,8 @@ public ArrowType GetAsType()
};

string timezone = format.Substring(format.IndexOf(':') + 1);
if (timezone.Length == 0) {
if (timezone.Length == 0)
{
timezone = null;
}
return new TimestampType(timeUnit, timezone);
Expand Down
6 changes: 4 additions & 2 deletions csharp/src/Apache.Arrow/Memory/ExportedAllocationOwner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,16 @@ public void IncRef()

public void DecRef()
{
if (Interlocked.Decrement(ref _referenceCount) == 0) {
if (Interlocked.Decrement(ref _referenceCount) == 0)
{
Dispose();
}
}

public void Dispose()
{
if (_disposed) {
if (_disposed)
{
return;
}
for (int i = 0; i < _pointers.Count; i++)
Expand Down
6 changes: 4 additions & 2 deletions csharp/test/Apache.Arrow.IntegrationTest/JsonFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ public class JsonSchema
/// <summary>
/// Decode this JSON schema as a Schema instance.
/// </summary>
public Schema ToArrow() {
public Schema ToArrow()
{
return CreateSchema(this);
}

Expand Down Expand Up @@ -293,7 +294,8 @@ public class JsonRecordBatch
/// <summary>
/// Decode this JSON record batch as a RecordBatch instance.
/// </summary>
public RecordBatch ToArrow(Schema schema) {
public RecordBatch ToArrow(Schema schema)
{
return CreateRecordBatch(schema, this);
}

Expand Down

0 comments on commit 78c5c4f

Please sign in to comment.