From fee217551c12754db517d1badd448fc9064a48a8 Mon Sep 17 00:00:00 2001 From: Nathan Scott Date: Thu, 26 Nov 2020 16:15:09 +1100 Subject: Drop unneeded parameters to the ScreenManager constructor All calls to ScreenManager_new always pass the same first five values, the orientation is always HORIZONTAL and the y1 parameter is always the height of the passed-in header struct pointer. I think its safe to assert at this point that no VERTICAL orientation will arrive (if it does, its no harm in re-adding this then) - so we can remove unused conditionals (and TODOs) based on orientation too. --- ScreenManager.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'ScreenManager.h') diff --git a/ScreenManager.h b/ScreenManager.h index 97e849f3..7dda4fca 100644 --- a/ScreenManager.h +++ b/ScreenManager.h @@ -16,17 +16,11 @@ in the source distribution for its full text. #include "Vector.h" -typedef enum Orientation_ { - VERTICAL, - HORIZONTAL -} Orientation; - typedef struct ScreenManager_ { int x1; int y1; int x2; int y2; - Orientation orientation; Vector* panels; int panelCount; Header* header; @@ -36,7 +30,7 @@ typedef struct ScreenManager_ { bool allowFocusChange; } ScreenManager; -ScreenManager* ScreenManager_new(int x1, int y1, int x2, int y2, Orientation orientation, Header* header, const Settings* settings, const State* state, bool owner); +ScreenManager* ScreenManager_new(Header* header, const Settings* settings, const State* state, bool owner); void ScreenManager_delete(ScreenManager* this); -- cgit v1.2.3