From a6ac42d5f65b83e9752aea80a54a6970297d6ebb Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sun, 2 Aug 2020 07:02:20 +0200 Subject: [PATCH] fairland: Drop "might be too small to fit continents" warning Commit de81e4e20 "Change fairland not to reject small worlds without trying" (v4.3.25) downgraded it from error to warning, pointing out it the size may well work, and when it doesn't, fairland fails cleanly. When it works, the warning is pointless. When it doesn't, it's redundant. Drop it. Signed-off-by: Markus Armbruster --- src/util/fairland.c | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/util/fairland.c b/src/util/fairland.c index 92516f33..c3ef00d1 100644 --- a/src/util/fairland.c +++ b/src/util/fairland.c @@ -347,19 +347,6 @@ print_vars(void) printf("World dimensions: %dx%d\n", WORLD_X, WORLD_Y); } -static int -my_sqrt(int n) -{ - int i; - - for (i = 1; i * i < n * 10000; ++i) ; - return (i + 50) / 100; -} - -/**************************************************************************** - PARSE COMMAND LINE ARGUMENTS -****************************************************************************/ - static void help(char *complaint) { @@ -466,11 +453,6 @@ parse_args(int argc, char *argv[]) puts("fairland: error -- distance from islands to continents too large"); exit(1); } - if (nc * sc + nc * my_sqrt(sc) * 2 * (di + 1) > WORLD_X * WORLD_Y) { - puts("fairland: warning -- world might be too small to fit continents."); - puts("arguments should satisfy:"); - puts("nc*sc*sc + nc*sqrt(sc)*2*(di+1) < WORLD_X * WORLD_Y"); - } } /****************************************************************************