]> git.localhorst.tv Git - blobs.git/commitdiff
old compilers
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Thu, 30 Nov 2017 22:27:38 +0000 (23:27 +0100)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Thu, 30 Nov 2017 22:27:38 +0000 (23:27 +0100)
*sigh*

src/creature/goal.cpp

index 9d3e1254c870670e15db2f38eb28d08358af57e6..e65a4dbf484ad743c23624c5fea28f225b9595ae 100644 (file)
@@ -240,7 +240,8 @@ void LocateResourceGoal::SearchVicinity() {
        glm::ivec2 begin(glm::max(glm::ivec2(0), loc - seek_radius));
        glm::ivec2 end(glm::min(glm::ivec2(planet.SideLength()), loc + seek_radius + glm::ivec2(1)));
 
-       double rating[end.y - begin.y][end.x - begin.x] { 0.0 };
+       double rating[end.y - begin.y][end.x - begin.x];
+       std::memset(rating, 0, sizeof(double) * (end.y - begin.y) * (end.x - begin.x))
 
        // find close and rich field
        for (int y = begin.y; y < end.y; ++y) {