From 7b3f77e04fb3875edfc8492c1c1530b1aa837ca1 Mon Sep 17 00:00:00 2001 From: obligaron Date: Wed, 7 Feb 2024 23:17:58 +0100 Subject: [PATCH] Minor improvment --- Source/items.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Source/items.cpp b/Source/items.cpp index f136bff40df8..00f58e1f5930 100644 --- a/Source/items.cpp +++ b/Source/items.cpp @@ -4576,7 +4576,8 @@ void PutItemRecord(uint32_t nSeed, uint16_t wCI, int nIndex) std::mt19937 BetterRng; std::string DebugSpawnItem(std::string itemName) { - if (ActiveItemCount >= MAXITEMS) return "No space to generate the item!"; + if (ActiveItemCount >= MAXITEMS) + return "No space to generate the item!"; const int max_time = 3000; const int max_iter = 1000000; @@ -4588,7 +4589,8 @@ std::string DebugSpawnItem(std::string itemName) uint32_t begin = SDL_GetTicks(); int i = 0; for (;; i++) { - // using a better rng here to seed the item to prevent getting stuck repeating same values using old one + // using a better rng here to seed the item + // to prevent getting stuck repeating same values using old one std::uniform_int_distribution dist(0, INT_MAX); SetRndSeed(dist(BetterRng)); if (SDL_GetTicks() - begin > max_time)