From e3c5bc8d2ebb9f8ab8f4cb64002bc3b8d0e10e37 Mon Sep 17 00:00:00 2001 From: rubidium Date: Tue, 26 May 2009 15:46:24 +0000 Subject: (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) --- src/saveload/saveload.cpp | 5 ----- src/saveload/vehicle_sl.cpp | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) (limited to 'src/saveload') 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(); } } } -- cgit v1.2.3-70-g09d2