mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
NOLINT bugprone-parent-virtual-call where clang-tidy is stupid
/media/ddnet/src/game/editor/layer_game.cpp:42:35: warning: qualified name 'm_pEditor->m_Map.m_pFrontLayer->CLayerTiles::SetTile' refers to a member overridden in subclass; did you mean 'CLayerTiles'? [bugprone-parent-virtual-call] m_pEditor->m_Map.m_pFrontLayer->CLayerTiles::SetTile(x, y, through_cut); ^~~~~~~~~~~~~ CLayerTiles:: /media/ddnet/src/game/editor/layer_game.cpp:42:35: note: FIX-IT applied suggested code changes
This commit is contained in:
parent
809ce102bd
commit
21d76ed31d
|
@ -39,14 +39,14 @@ void CLayerGame::SetTile(int x, int y, CTile tile)
|
|||
CTile nohook = {TILE_NOHOOK};
|
||||
CLayerTiles::SetTile(x, y, nohook);
|
||||
CTile through_cut = {TILE_THROUGH_CUT};
|
||||
m_pEditor->m_Map.m_pFrontLayer->CLayerTiles::SetTile(x, y, through_cut);
|
||||
m_pEditor->m_Map.m_pFrontLayer->CLayerTiles::SetTile(x, y, through_cut); // NOLINT(bugprone-parent-virtual-call)
|
||||
}
|
||||
else
|
||||
{
|
||||
if(m_pEditor->m_Map.m_pFrontLayer && m_pEditor->m_Map.m_pFrontLayer->GetTile(x, y).m_Index == TILE_THROUGH_CUT)
|
||||
{
|
||||
CTile air = {TILE_AIR};
|
||||
m_pEditor->m_Map.m_pFrontLayer->CLayerTiles::SetTile(x, y, air);
|
||||
m_pEditor->m_Map.m_pFrontLayer->CLayerTiles::SetTile(x, y, air); // NOLINT(bugprone-parent-virtual-call)
|
||||
}
|
||||
if(m_pEditor->m_AllowPlaceUnusedTiles || IsValidGameTile(tile.m_Index))
|
||||
{
|
||||
|
|
|
@ -1697,12 +1697,12 @@ void CLayerFront::SetTile(int x, int y, CTile tile)
|
|||
if(tile.m_Index == TILE_THROUGH_CUT)
|
||||
{
|
||||
CTile nohook = {TILE_NOHOOK};
|
||||
m_pEditor->m_Map.m_pGameLayer->CLayerTiles::SetTile(x, y, nohook);
|
||||
m_pEditor->m_Map.m_pGameLayer->CLayerTiles::SetTile(x, y, nohook); // NOLINT(bugprone-parent-virtual-call)
|
||||
}
|
||||
else if(tile.m_Index == TILE_AIR && CLayerTiles::GetTile(x, y).m_Index == TILE_THROUGH_CUT)
|
||||
{
|
||||
CTile air = {TILE_AIR};
|
||||
m_pEditor->m_Map.m_pGameLayer->CLayerTiles::SetTile(x, y, air);
|
||||
m_pEditor->m_Map.m_pGameLayer->CLayerTiles::SetTile(x, y, air); // NOLINT(bugprone-parent-virtual-call)
|
||||
}
|
||||
if(m_pEditor->m_AllowPlaceUnusedTiles || IsValidFrontTile(tile.m_Index))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue