aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-07-19 05:58:52 +0100
committerJustin Clark-Casey (justincc)2011-07-19 05:58:52 +0100
commit25c532f2ec0c747eb9c9b6f8fff477a4fb375894 (patch)
treeaaecaad566e2c26986f28c580965d51d28e9cab6
parentrip out pointless null checks in UndoState where part can never be null (diff)
downloadopensim-SC_OLD-25c532f2ec0c747eb9c9b6f8fff477a4fb375894.zip
opensim-SC_OLD-25c532f2ec0c747eb9c9b6f8fff477a4fb375894.tar.gz
opensim-SC_OLD-25c532f2ec0c747eb9c9b6f8fff477a4fb375894.tar.bz2
opensim-SC_OLD-25c532f2ec0c747eb9c9b6f8fff477a4fb375894.tar.xz
refator: simplify UndoState.Compare() code
-rw-r--r--OpenSim/Region/Framework/Scenes/UndoState.cs29
1 files changed, 9 insertions, 20 deletions
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
101 if (part != null) 101 if (part != null)
102 { 102 {
103 if (part.ParentID == 0) 103 if (part.ParentID == 0)
104 { 104 return
105 if (Position == part.ParentGroup.AbsolutePosition 105 Position == part.ParentGroup.AbsolutePosition
106 && Rotation == part.RotationOffset 106 && Rotation == part.RotationOffset
107 && Scale == part.Shape.Scale) 107 && Scale == part.Shape.Scale;
108 return true;
109 else
110 return false;
111 }
112 else 108 else
113 { 109 return
114 if (Position == part.OffsetPosition 110 Position == part.OffsetPosition
115 && Rotation == part.RotationOffset 111 && Rotation == part.RotationOffset
116 && Scale == part.Shape.Scale) 112 && Scale == part.Shape.Scale;
117 return true;
118 else
119 return false;
120 }
121 } 113 }
122 114
123 return false; 115 return false;
@@ -249,10 +241,7 @@ namespace OpenSim.Region.Framework.Scenes
249 241
250 public bool Compare(ITerrainChannel terrainChannel) 242 public bool Compare(ITerrainChannel terrainChannel)
251 { 243 {
252 if (m_terrainChannel != terrainChannel) 244 return m_terrainChannel == terrainChannel;
253 return false;
254 else
255 return false;
256 } 245 }
257 246
258 public void PlaybackState() 247 public void PlaybackState()