From 3d32f05cded90da3d3ad318220dfc30b64df5845 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Fri, 17 Dec 2010 22:40:11 +0000 Subject: [PATCH] remove mono compiler warning: if (sop.Color != null) always returns true as sop.Color is a value type. --- .../Serialization/SceneObjectSerializer.cs | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs index 6c9826fcf0..605521a0fa 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs @@ -1114,15 +1114,13 @@ namespace OpenSim.Region.Framework.Scenes.Serialization WriteVector(writer, "AngularVelocity", sop.AngularVelocity); WriteVector(writer, "Acceleration", sop.Acceleration); writer.WriteElementString("Description", sop.Description); - if (sop.Color != null) - { - writer.WriteStartElement("Color"); - writer.WriteElementString("R", sop.Color.R.ToString(Utils.EnUsCulture)); - writer.WriteElementString("G", sop.Color.G.ToString(Utils.EnUsCulture)); - writer.WriteElementString("B", sop.Color.B.ToString(Utils.EnUsCulture)); - writer.WriteElementString("A", sop.Color.G.ToString(Utils.EnUsCulture)); - writer.WriteEndElement(); - } + + writer.WriteStartElement("Color"); + writer.WriteElementString("R", sop.Color.R.ToString(Utils.EnUsCulture)); + writer.WriteElementString("G", sop.Color.G.ToString(Utils.EnUsCulture)); + writer.WriteElementString("B", sop.Color.B.ToString(Utils.EnUsCulture)); + writer.WriteElementString("A", sop.Color.G.ToString(Utils.EnUsCulture)); + writer.WriteEndElement(); writer.WriteElementString("Text", sop.Text); writer.WriteElementString("SitName", sop.SitName);