mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-16 13:15:07 +00:00
fix: Use if statement instead of while when checking if SQL read was successful in IcdTimeZoneInfo
This commit is contained in:
@@ -171,7 +171,7 @@ namespace ICD.Common.Utils.TimeZoneInfo
|
|||||||
{
|
{
|
||||||
using (IcdSqliteDataReader reader = cmd.ExecuteReader())
|
using (IcdSqliteDataReader reader = cmd.ExecuteReader())
|
||||||
{
|
{
|
||||||
while (reader.Read())
|
if (reader.Read())
|
||||||
{
|
{
|
||||||
bool isFixed = reader.GetBoolean(2);
|
bool isFixed = reader.GetBoolean(2);
|
||||||
string timeOfDay = reader.GetString(3);
|
string timeOfDay = reader.GetString(3);
|
||||||
@@ -208,7 +208,7 @@ namespace ICD.Common.Utils.TimeZoneInfo
|
|||||||
{
|
{
|
||||||
using (IcdSqliteDataReader reader = cmd.ExecuteReader())
|
using (IcdSqliteDataReader reader = cmd.ExecuteReader())
|
||||||
{
|
{
|
||||||
while (reader.Read())
|
if (reader.Read())
|
||||||
{
|
{
|
||||||
bool isFixed = reader.GetBoolean(2);
|
bool isFixed = reader.GetBoolean(2);
|
||||||
string timeOfDay = reader.GetString(3);
|
string timeOfDay = reader.GetString(3);
|
||||||
|
|||||||
Reference in New Issue
Block a user