From ee62e02ff2875a6d8a92b7ff93e153cc5f55f672 Mon Sep 17 00:00:00 2001 From: Vassily Ivanov Date: Thu, 10 Apr 2014 09:53:02 +0400 Subject: [PATCH 1/2] Retargeted to .NET 4.5 --- Source/STL/STL.csproj | 2 +- Source/Test/Test.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/STL/STL.csproj b/Source/STL/STL.csproj index 9e851ee..6715839 100644 --- a/Source/STL/STL.csproj +++ b/Source/STL/STL.csproj @@ -10,7 +10,7 @@ Properties QuantumConcepts.Formats.STL QuantumConcepts.Formats.StereoLithography - v4.5.1 + v4.5 512 diff --git a/Source/Test/Test.csproj b/Source/Test/Test.csproj index 69cbab3..d0edbf2 100644 --- a/Source/Test/Test.csproj +++ b/Source/Test/Test.csproj @@ -8,7 +8,7 @@ Properties QuantumConcepts.Formats.StereoLithography.Test QuantumConcepts.Formats.StereoLithography.Test - v4.5.1 + v4.5 512 {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 10.0 From db37d84f7154ef281f035dacca1288ace3e39ad7 Mon Sep 17 00:00:00 2001 From: Vassily Ivanov Date: Fri, 11 Apr 2014 08:17:53 +0400 Subject: [PATCH 2/2] Use CultureInfo.InvariantCulture for parsing numbers. --- Source/STL/Vertex.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/STL/Vertex.cs b/Source/STL/Vertex.cs index 37f6edc..6d93e50 100644 --- a/Source/STL/Vertex.cs +++ b/Source/STL/Vertex.cs @@ -103,13 +103,13 @@ public static Vertex Read(StreamReader reader) return null; //Parse the three coordinates. - if (!float.TryParse(match.Groups["X"].Value, numberStyle, CultureInfo.CurrentCulture, out x)) + if (!float.TryParse(match.Groups["X"].Value, numberStyle, CultureInfo.InvariantCulture, out x)) throw new FormatException("Could not parse X coordinate \"{0}\" as a decimal.".FormatString(match.Groups["X"])); - if (!float.TryParse(match.Groups["Y"].Value, numberStyle, CultureInfo.CurrentCulture, out y)) + if (!float.TryParse(match.Groups["Y"].Value, numberStyle, CultureInfo.InvariantCulture, out y)) throw new FormatException("Could not parse Y coordinate \"{0}\" as a decimal.".FormatString(match.Groups["Y"])); - if (!float.TryParse(match.Groups["Z"].Value, numberStyle, CultureInfo.CurrentCulture, out z)) + if (!float.TryParse(match.Groups["Z"].Value, numberStyle, CultureInfo.InvariantCulture, out z)) throw new FormatException("Could not parse Z coordinate \"{0}\" as a decimal.".FormatString(match.Groups["Z"])); return new Vertex()