From 41cdecf5cb4737963991ef81107a2a4875895f3d Mon Sep 17 00:00:00 2001 From: rishtigupta Date: Thu, 8 Jun 2023 09:45:12 -0700 Subject: [PATCH] feat: remove checked from list length member access --- src/Momento.Sdk/Responses/CacheListLengthResponse.cs | 2 +- src/Momento.Sdk/Responses/CacheListPopBackResponse.cs | 2 +- src/Momento.Sdk/Responses/CacheListPopFrontResponse.cs | 2 +- src/Momento.Sdk/Responses/CacheListRetainResponse.cs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Momento.Sdk/Responses/CacheListLengthResponse.cs b/src/Momento.Sdk/Responses/CacheListLengthResponse.cs index f73e3409..3c52e318 100644 --- a/src/Momento.Sdk/Responses/CacheListLengthResponse.cs +++ b/src/Momento.Sdk/Responses/CacheListLengthResponse.cs @@ -46,7 +46,7 @@ public Success(_ListLengthResponse response) { if (response.ListCase == _ListLengthResponse.ListOneofCase.Found) { - Length = checked((int)response.Found.Length); + Length = (int)response.Found.Length; } } diff --git a/src/Momento.Sdk/Responses/CacheListPopBackResponse.cs b/src/Momento.Sdk/Responses/CacheListPopBackResponse.cs index f5baae13..9bdf7fbe 100644 --- a/src/Momento.Sdk/Responses/CacheListPopBackResponse.cs +++ b/src/Momento.Sdk/Responses/CacheListPopBackResponse.cs @@ -56,7 +56,7 @@ public class Hit : CacheListPopBackResponse public Hit(_ListPopBackResponse response) { this.value = response.Found.Back; - ListLength = checked((int)response.Found.ListLength); + ListLength = (int)response.Found.ListLength; } /// diff --git a/src/Momento.Sdk/Responses/CacheListPopFrontResponse.cs b/src/Momento.Sdk/Responses/CacheListPopFrontResponse.cs index a56a304e..b2ba468c 100644 --- a/src/Momento.Sdk/Responses/CacheListPopFrontResponse.cs +++ b/src/Momento.Sdk/Responses/CacheListPopFrontResponse.cs @@ -56,7 +56,7 @@ public class Hit : CacheListPopFrontResponse public Hit(_ListPopFrontResponse response) { this.value = response.Found.Front; - ListLength = checked((int)response.Found.ListLength); + ListLength = (int)response.Found.ListLength; } /// diff --git a/src/Momento.Sdk/Responses/CacheListRetainResponse.cs b/src/Momento.Sdk/Responses/CacheListRetainResponse.cs index 2c59dd91..601d4499 100644 --- a/src/Momento.Sdk/Responses/CacheListRetainResponse.cs +++ b/src/Momento.Sdk/Responses/CacheListRetainResponse.cs @@ -44,7 +44,7 @@ public class Success : CacheListRetainResponse /// The cache response public Success(_ListRetainResponse response) { - ListLength = checked((int)response.Found.ListLength); + ListLength = (int)response.Found.ListLength; } ///