From 5201218e20293472224df5dc59a99d41b4e43b72 Mon Sep 17 00:00:00 2001 From: Kp Date: Fri, 13 Jan 2017 03:19:19 +0000 Subject: [PATCH] Fix D1 build Commit 4cc801f changed `object_move_one` to return `window_event_result` instead of `void` and added a default return value at the bottom. However, it added the value inside a `#if D2` block, so the D1 build now fails with: similar/main/object.cpp: In function 'dcx::window_event_result d1x::object_move_one(d1x::vobjptridx_t)': similar/main/object.cpp:1627:7: error: variable 'result' set but not used [-Werror=unused-but-set-variable] similar/main/object.cpp:1866:1: error: control reaches end of non-void function [-Werror=return-type] Move the return statement out of the conditional block to fix both these errors. Fixes: 4cc801f42fdce011c2b5e332cb63ac120420ea42 ("Remove calls to window_close(Game_wind) when game finished or over") --- similar/main/object.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/similar/main/object.cpp b/similar/main/object.cpp index fe78e1fc5..cf0993a32 100644 --- a/similar/main/object.cpp +++ b/similar/main/object.cpp @@ -1861,8 +1861,8 @@ static window_event_result object_move_one(const vobjptridx_t obj) } } - return result; #endif + return result; } //--------------------------------------------------------------------