From eeacbc80c6479ffb137e6b8b0d430cd820cbb0f6 Mon Sep 17 00:00:00 2001 From: PatrikLundell Date: Thu, 16 Jan 2020 13:59:31 +0100 Subject: [PATCH] Explicit type conversion with %d warning silencing --- plugins/getplants.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/getplants.cpp b/plugins/getplants.cpp index 1b326b8cd..5fa1c8637 100644 --- a/plugins/getplants.cpp +++ b/plugins/getplants.cpp @@ -327,7 +327,7 @@ command_result df_getplants (color_ostream &out, vector & parameters) } if (!deselect && Designations::markPlant(plant)) { -// out.print("Designated %s at (%i, %i, %i), %d\n", world->raws.plants.all[plant->material]->id.c_str(), plant->pos.x, plant->pos.y, plant->pos.z, i); +// out.print("Designated %s at (%i, %i, %i), %d\n", world->raws.plants.all[plant->material]->id.c_str(), plant->pos.x, plant->pos.y, plant->pos.z, (int)i); collectionCount[plant->material]++; ++count; } @@ -339,12 +339,12 @@ command_result df_getplants (color_ostream &out, vector & parameters) for (size_t i = 0; i < plantSelections.size(); i++) { if (collectionCount[i] > 0) - out.print("Updated %d %s designations.\n", collectionCount[i], world->raws.plants.all[i]->id.c_str()); + out.print("Updated %d %s designations.\n", (int)collectionCount[i], world->raws.plants.all[i]->id.c_str()); } out.print("\n"); } } - out.print("Updated %d plant designations.\n", count); + out.print("Updated %d plant designations.\n", (int)count); return CR_OK; }