TODO: modify other races constructors
did some reworking
This commit is contained in:
@ -65,16 +65,12 @@ std::vector<position> remove_from_list(const std::vector<position>
|
||||
return result;
|
||||
}
|
||||
|
||||
std::vector<position> remove_from_list(const std::vector<position>
|
||||
&sorted_positions,
|
||||
position &excluded) {
|
||||
|
||||
std::vector<position> result{sorted_positions.size() - 1};
|
||||
|
||||
for (auto src : sorted_positions) {
|
||||
if (src != excluded)
|
||||
result.push_back(src);
|
||||
}
|
||||
|
||||
return result;
|
||||
void remove_from_list(std::vector<position>
|
||||
&positions,
|
||||
position &excluded) {
|
||||
for (auto i = positions.begin(); i != positions.end(); ++i)
|
||||
if (*i == excluded) {
|
||||
positions.erase(i);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user