/*
* Empire - A multi-player, client/server Internet based war game.
- * Copyright (C) 1986-2015, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ * Copyright (C) 1986-2020, Dave Pare, Jeff Bailey, Thomas Ruschak,
* Ken Stevens, Steve McClure, Markus Armbruster
*
* Empire is free software: you can redistribute it and/or modify
* paths.c: Routines associated with paths, directions, etc.
*
* Known contributors to this file:
- * Markus Armbruster, 2005-2011
+ * Markus Armbruster, 2005-2020
*/
#include <config.h>
-#include "file.h"
#include "optlist.h"
#include "path.h"
#include "player.h"
{
unsigned i = dir - 'a';
- if (CANT_HAPPEN(i >= sizeof(dirindex) / sizeof(*dirindex)
+ if (CANT_HAPPEN(i >= ARRAY_SIZE(dirindex)
|| dirindex[i] < 0))
return DIR_STOP;
return dirindex[i];