From 25c532f2ec0c747eb9c9b6f8fff477a4fb375894 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 19 Jul 2011 05:58:52 +0100 Subject: refator: simplify UndoState.Compare() code --- OpenSim/Region/Framework/Scenes/UndoState.cs | 29 +++++++++------------------- 1 file changed, 9 insertions(+), 20 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/UndoState.cs b/OpenSim/Region/Framework/Scenes/UndoState.cs index f7bed5a..393f42d 100644 --- a/OpenSim/Region/Framework/Scenes/UndoState.cs +++ b/OpenSim/Region/Framework/Scenes/UndoState.cs @@ -101,23 +101,15 @@ namespace OpenSim.Region.Framework.Scenes if (part != null) { if (part.ParentID == 0) - { - if (Position == part.ParentGroup.AbsolutePosition - && Rotation == part.RotationOffset - && Scale == part.Shape.Scale) - return true; - else - return false; - } + return + Position == part.ParentGroup.AbsolutePosition + && Rotation == part.RotationOffset + && Scale == part.Shape.Scale; else - { - if (Position == part.OffsetPosition - && Rotation == part.RotationOffset - && Scale == part.Shape.Scale) - return true; - else - return false; - } + return + Position == part.OffsetPosition + && Rotation == part.RotationOffset + && Scale == part.Shape.Scale; } return false; @@ -249,10 +241,7 @@ namespace OpenSim.Region.Framework.Scenes public bool Compare(ITerrainChannel terrainChannel) { - if (m_terrainChannel != terrainChannel) - return false; - else - return false; + return m_terrainChannel == terrainChannel; } public void PlaybackState() -- cgit v1.1