Remove unnecessary object creation in emplace_front

Fixes

```
/home/chiller/Desktop/git/ddnet/src/engine/client/updater.cpp:186:27: error: unnecessary temporary object created while calling emplace_front [modernize-use-emplace,-warnings-as-errors]
  186 |         m_FileJobs.emplace_front(std::make_pair(pFile, Job));
      |                                  ^~~~~~~~~~~~~~~          ~
```
This commit is contained in:
ChillerDragon 2024-05-06 12:32:49 +08:00
parent 5ad62b5732
commit c4f68f50ea
2 changed files with 3 additions and 3 deletions

View file

@ -183,7 +183,7 @@ void CUpdater::Update()
void CUpdater::AddFileJob(const char *pFile, bool Job) void CUpdater::AddFileJob(const char *pFile, bool Job)
{ {
m_FileJobs.emplace_front(std::make_pair(pFile, Job)); m_FileJobs.emplace_front(pFile, Job);
} }
bool CUpdater::ReplaceClient() bool CUpdater::ReplaceClient()

View file

@ -8475,8 +8475,8 @@ void CEditor::OnMouseMove(float MouseX, float MouseY)
continue; continue;
CTile Tile = pTiles->GetTile(x, y); CTile Tile = pTiles->GetTile(x, y);
if(Tile.m_Index) if(Tile.m_Index)
m_vHoverTiles.emplace_back(CHoverTile( m_vHoverTiles.emplace_back(
g, l, x, y, Tile)); g, l, x, y, Tile);
} }
} }
Ui()->MapScreen(); Ui()->MapScreen();