src/slope_func.h
branchnoai
changeset 9869 6404afe43575
parent 9724 b39bc69bb2f2
child 10955 56b381e5253f
--- a/src/slope_func.h	Sun Apr 06 14:12:19 2008 +0000
+++ b/src/slope_func.h	Sun Apr 06 23:07:42 2008 +0000
@@ -54,7 +54,7 @@
  */
 static inline Slope RemoveHalftileSlope(Slope s)
 {
-	return (Slope)(s & ~SLOPE_HALFTILE_MASK);
+	return s & ~SLOPE_HALFTILE_MASK;
 }
 
 /**
@@ -71,7 +71,7 @@
 static inline Slope ComplementSlope(Slope s)
 {
 	assert(!IsSteepSlope(s) && !IsHalftileSlope(s));
-	return (Slope)(0xF ^ s);
+	return s ^ SLOPE_ELEVATED;
 }
 
 /**
@@ -200,7 +200,7 @@
  */
 static inline Slope SteepSlope(Corner corner)
 {
-	return (Slope)(SLOPE_STEEP | SlopeWithThreeCornersRaised(OppositeCorner(corner)));
+	return SLOPE_STEEP | SlopeWithThreeCornersRaised(OppositeCorner(corner));
 }
 
 /**