From 4cd2ff9a3da1a02d4a159dd185a930f1bf7330c0 Mon Sep 17 00:00:00 2001 From: elsid Date: Sun, 17 Nov 2019 16:53:29 +0100 Subject: [PATCH] Avoid virtual call in TerrainGrid dtor /home/elsid/dev/openmw/components/terrain/terraingrid.cpp:31:9: warning: Call to virtual function during destruction [clang-analyzer-optin.cplusplus.VirtualCall] unloadCell(mGrid.begin()->first.first, mGrid.begin()->first.second); ^ /home/elsid/dev/openmw/components/terrain/terraingrid.cpp:29:12: note: Assuming the condition is true while (!mGrid.empty()) ^ /home/elsid/dev/openmw/components/terrain/terraingrid.cpp:29:5: note: Loop condition is true. Entering loop body while (!mGrid.empty()) ^ /home/elsid/dev/openmw/components/terrain/terraingrid.cpp:31:9: note: This destructor of an object of type '~TerrainGrid' has not returned when the virtual method was called unloadCell(mGrid.begin()->first.first, mGrid.begin()->first.second); ^ /home/elsid/dev/openmw/components/terrain/terraingrid.cpp:31:9: note: Call to virtual function during destruction --- components/terrain/terraingrid.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/terrain/terraingrid.cpp b/components/terrain/terraingrid.cpp index c912403346..7310846c21 100644 --- a/components/terrain/terraingrid.cpp +++ b/components/terrain/terraingrid.cpp @@ -28,7 +28,7 @@ TerrainGrid::~TerrainGrid() { while (!mGrid.empty()) { - unloadCell(mGrid.begin()->first.first, mGrid.begin()->first.second); + TerrainGrid::unloadCell(mGrid.begin()->first.first, mGrid.begin()->first.second); } }