From 7c19a0778c19ad8dc51b1876a3ea350762135d4e Mon Sep 17 00:00:00 2001 From: eugene-hong <58686228+eugene-doobu@users.noreply.github.com> Date: Tue, 3 Dec 2024 13:45:32 +0900 Subject: [PATCH] remove parse float --- Lib9c/TableData/Character/CharacterSheet.cs | 2 +- Lib9c/TableData/TableExtensions.cs | 12 ------------ 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/Lib9c/TableData/Character/CharacterSheet.cs b/Lib9c/TableData/Character/CharacterSheet.cs index e13c3e9aeb..e9a404ce1d 100644 --- a/Lib9c/TableData/Character/CharacterSheet.cs +++ b/Lib9c/TableData/Character/CharacterSheet.cs @@ -56,7 +56,7 @@ public override void Set(IReadOnlyList fields) RunSpeed = TryParseFloat(fields[16], out var runSpeed) ? runSpeed : 1f; } } - + public CharacterSheet() : base(nameof(CharacterSheet)) { } diff --git a/Lib9c/TableData/TableExtensions.cs b/Lib9c/TableData/TableExtensions.cs index eaf3d6377d..33e2bed784 100644 --- a/Lib9c/TableData/TableExtensions.cs +++ b/Lib9c/TableData/TableExtensions.cs @@ -45,18 +45,6 @@ public static decimal ParseDecimal(string value) public static decimal ParseDecimal(string value, decimal defaultValue) => TryParseDecimal(value, out var result) ? result : defaultValue; - public static float ParseFloat(string value) - { - if (TryParseFloat(value, out var result)) - { - return result; - } - throw new ArgumentException(value); - } - - public static float ParseFloat(string value, float defaultValue) => - TryParseFloat(value, out var result) ? result : defaultValue; - public static long ParseLong(string value) { if (TryParseLong(value, out var result))