@@ -731,8 +731,7 @@ void GamePlayer::FindMaterialForBuildingSites()
731731
732732void GamePlayer::AddJobWanted (const Job job, noRoadNode* workplace)
733733{
734- // Und gleich suchen
735- if (!FindWarehouseForJob (job, workplace))
734+ if (!FindWarehouseForJob (job, *workplace))
736735 {
737736 JobNeeded jn = {job, workplace};
738737 jobs_wanted.push_back (jn);
@@ -803,9 +802,9 @@ void GamePlayer::ToolOrderProcessed(Tool tool)
803802 }
804803}
805804
806- bool GamePlayer::FindWarehouseForJob (const Job job, noRoadNode* goal) const
805+ bool GamePlayer::FindWarehouseForJob (const Job job, noRoadNode& goal) const
807806{
808- nobBaseWarehouse* wh = FindWarehouse (* goal, FW::HasFigure (job, true ), false , false );
807+ nobBaseWarehouse* wh = FindWarehouse (goal, FW::HasFigure (job, true ), false , false );
809808
810809 if (wh)
811810 {
@@ -821,7 +820,7 @@ void GamePlayer::FindWarehouseForAllJobs()
821820{
822821 for (auto it = jobs_wanted.begin (); it != jobs_wanted.end ();)
823822 {
824- if (FindWarehouseForJob (it->job , it->workplace ))
823+ if (FindWarehouseForJob (it->job , * it->workplace ))
825824 it = jobs_wanted.erase (it);
826825 else
827826 ++it;
@@ -834,7 +833,7 @@ void GamePlayer::FindWarehouseForAllJobs(const Job job)
834833 {
835834 if (it->job == job)
836835 {
837- if (FindWarehouseForJob (it->job , it->workplace ))
836+ if (FindWarehouseForJob (it->job , * it->workplace ))
838837 it = jobs_wanted.erase (it);
839838 else
840839 ++it;
@@ -1309,9 +1308,8 @@ void GamePlayer::CallFlagWorker(const MapPoint pt, const Job job)
13091308 // / Find wh with given job type (e.g. geologist, scout, ...)
13101309 nobBaseWarehouse* wh = FindWarehouse (*flag, FW::HasFigure (job, true ), false , false );
13111310
1312- // / Wenns eins gibt, dann rufen
13131311 if (wh)
1314- wh->OrderJob (job, flag, true );
1312+ wh->OrderJob (job, * flag, true );
13151313}
13161314
13171315bool GamePlayer::IsFlagWorker (const nofFlagWorker* flagworker)
0 commit comments