Skip to content

Commit 15380c3

Browse files
committed
few more stylistic reverts on FromString
1 parent 0d35137 commit 15380c3

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/LengthConverter.cs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,7 @@ static internal double FromString(string s, CultureInfo cultureInfo)
178178
//Auto is represented and Double.NaN
179179
//properties that do not want Auto and NaN to be in their ligit values,
180180
//should disallow NaN in validation callbacks (same goes for negative values)
181-
if (goodString == "auto")
182-
return Double.NaN;
181+
if (goodString == "auto") return Double.NaN;
183182

184183
for (int i = 0; i < PixelUnitStrings.Length; i++)
185184
{
@@ -216,8 +215,8 @@ static internal double FromString(string s, CultureInfo cultureInfo)
216215
// These are effectively "TypeConverter only" units.
217216
// They are all expressable in terms of the Pixel unit type and a conversion factor.
218217
static private string[] PixelUnitStrings = { "px", "in", "cm", "pt" };
219-
static private double[] PixelUnitFactors =
220-
{
218+
static private double[] PixelUnitFactors =
219+
{
221220
1.0, // Pixel itself
222221
96.0, // Pixels per Inch
223222
96.0 / 2.54, // Pixels per Centimeter
@@ -226,8 +225,7 @@ static internal double FromString(string s, CultureInfo cultureInfo)
226225

227226
static internal string ToString(double l, CultureInfo cultureInfo)
228227
{
229-
if (double.IsNaN(l))
230-
return "Auto";
228+
if(double.IsNaN(l)) return "Auto";
231229
return Convert.ToString(l, cultureInfo);
232230
}
233231

0 commit comments

Comments
 (0)