summaryrefslogtreecommitdiff
path: root/src/saveload
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-05-26 15:46:24 +0000
committerrubidium <rubidium@openttd.org>2009-05-26 15:46:24 +0000
commite3c5bc8d2ebb9f8ab8f4cb64002bc3b8d0e10e37 (patch)
tree65f84aef7bfb97e14166b4b973f182e4c7a6c0f7 /src/saveload
parent2a5a8f395c0c71146259433a1a4abe7807d2f8ac (diff)
downloadopenttd-e3c5bc8d2ebb9f8ab8f4cb64002bc3b8d0e10e37.tar.xz
(svn r16434) -Cleanup: remove some dead code; primarily stuff that can't be reached like break after returns or break after functions that never return (i.e. NOT_REACHED)
Diffstat (limited to 'src/saveload')
-rw-r--r--src/saveload/saveload.cpp5
-rw-r--r--src/saveload/vehicle_sl.cpp2
2 files changed, 1 insertions, 6 deletions
diff --git a/src/saveload/saveload.cpp b/src/saveload/saveload.cpp
index 9735970d9..3412ae218 100644
--- a/src/saveload/saveload.cpp
+++ b/src/saveload/saveload.cpp
@@ -488,9 +488,6 @@ int64 ReadValue(const void *ptr, VarType conv)
case SLE_VAR_NULL:return 0;
default: NOT_REACHED();
}
-
- /* useless, but avoids compiler warning this way */
- return 0;
}
/** Write the value of a setting
@@ -1488,8 +1485,6 @@ static size_t ReferenceToInt(const void *obj, SLRefType rt)
case REF_ORDERLIST: return ((const OrderList*)obj)->index + 1;
default: NOT_REACHED();
}
-
- return 0; // avoid compiler warning
}
/**
diff --git a/src/saveload/vehicle_sl.cpp b/src/saveload/vehicle_sl.cpp
index 6554baf02..3170bb34a 100644
--- a/src/saveload/vehicle_sl.cpp
+++ b/src/saveload/vehicle_sl.cpp
@@ -149,7 +149,7 @@ void ConvertOldMultiheadToNew()
SetTrainWagon(u);
SetFreeWagon(u);
break;
- default: NOT_REACHED(); break;
+ default: NOT_REACHED();
}
}
}