← Back to team overview

widelands-dev team mailing list archive

Re: [Merge] lp:~widelands-dev/widelands/buildhelp_overlay into lp:widelands

 

I think we could further simplify FieldOverlayManager::get_overlays by making kLevelForBuildHelp part of the OverlayLevel enum class, something like this:

	auto it = overlays_.lower_bound(c);
	while (it != overlays_.end() && it->first == c) {
            if (buildhelp_ && it->second.level == OverlayLevel::kLevelForBuildHelp) {
                result->emplace_back(buildhelp_infos_[get_buildhelp_overlay(c)]);
            } else {
		result->emplace_back(it->second.pic, it->second.hotspot);
		++it;
            }
	}

We should then be able to use a range-bases for loop too?
-- 
https://code.launchpad.net/~widelands-dev/widelands/buildhelp_overlay/+merge/328956
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/buildhelp_overlay into lp:widelands.


References