Teppo Mäenpää has proposed merging 
lp:~widelands-dev/widelands/bug-1746030-scout-assert-failures into lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1746030 in widelands: "Recent scout improvement has assert failures"
  https://bugs.launchpad.net/widelands/+bug/1746030

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1746030-scout-assert-failures/+merge/336787

Moved an assert statement to its correct location.
-- 
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/bug-1746030-scout-assert-failures into lp:widelands.
=== modified file 'src/logic/map_objects/tribes/worker.cc'
--- src/logic/map_objects/tribes/worker.cc	2018-01-27 16:08:55 +0000
+++ src/logic/map_objects/tribes/worker.cc	2018-01-29 16:31:36 +0000
@@ -2809,6 +2809,7 @@
 	// Check whether there is still undone work in the queue,
 	// keeping in mind that 1st element of the vector is special
 	if (2 > scouts_worklist.size()) {
+		assert(1 == scouts_worklist.size());
 		// If there was only one entry, worklist has been exhausted. Rebuild it.
 		// Time to find new places worth visiting.
 		Area<FCoords> revealations(map.get_fcoords(get_position()), state.ivar1);
@@ -2822,8 +2823,6 @@
 		// Always push a "go-anywhere" -directive into work list.
 		const PlaceToScout gosomewhere;
 		scouts_worklist.push_back(gosomewhere);
-	} else {
-		assert(1 == scouts_worklist.size());
 	}
 
 	// first get out

_______________________________________________
Mailing list: https://launchpad.net/~widelands-dev
Post to     : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to