From 847cf2b9c632fcccb80f41505674efd09bb70c1f Mon Sep 17 00:00:00 2001 From: Michael Krisper <michael.krisper@tugraz.at> Date: Wed, 17 Aug 2016 11:35:41 +0200 Subject: [PATCH] RetarderLossMap: Change Argument from List to Array --- .../InputData/Reader/ComponentData/RetarderLossMapReader.cs | 2 +- .../Models/SimulationComponent/Data/RetarderLossMap.cs | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/VectoCore/VectoCore/InputData/Reader/ComponentData/RetarderLossMapReader.cs b/VectoCore/VectoCore/InputData/Reader/ComponentData/RetarderLossMapReader.cs index a6e9b1a44d..672e74366b 100644 --- a/VectoCore/VectoCore/InputData/Reader/ComponentData/RetarderLossMapReader.cs +++ b/VectoCore/VectoCore/InputData/Reader/ComponentData/RetarderLossMapReader.cs @@ -48,7 +48,7 @@ namespace TUGraz.VectoCore.InputData.Reader.ComponentData .Select(row => new RetarderLossMap.RetarderLossEntry { RetarderSpeed = row.ParseDouble(Fields.RetarderSpeed).RPMtoRad(), TorqueLoss = row.ParseDouble(Fields.TorqueLoss).SI<NewtonMeter>() - }).OrderBy(e => e.RetarderSpeed)); + }).OrderBy(e => e.RetarderSpeed).ToArray()); } public static class Fields diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Data/RetarderLossMap.cs b/VectoCore/VectoCore/Models/SimulationComponent/Data/RetarderLossMap.cs index 01852349ed..95efbcc486 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Data/RetarderLossMap.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Data/RetarderLossMap.cs @@ -29,7 +29,6 @@ * Martin Rexeis, rexeis@ivt.tugraz.at, IVT, Graz University of Technology */ -using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using TUGraz.VectoCommon.Utils; @@ -45,9 +44,9 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data private PerSecond _minSpeed; private PerSecond _maxSpeed; - protected internal RetarderLossMap(IEnumerable<RetarderLossEntry> entries) + protected internal RetarderLossMap(RetarderLossEntry[] entries) { - _entries = entries.ToArray(); + _entries = entries; } /// <summary> -- GitLab