Use std::swap in promote(mle)
This commit is contained in:
parent
4d4dbab52f
commit
b8ee7b23df
|
@ -581,11 +581,7 @@ static void promote (mle *mission_list, const char * mission_name, int * top_pla
|
||||||
for (i = *top_place; i < num_missions; i++)
|
for (i = *top_place; i < num_missions; i++)
|
||||||
if (!d_stricmp(mission_list[i].filename, name)) {
|
if (!d_stricmp(mission_list[i].filename, name)) {
|
||||||
//swap mission positions
|
//swap mission positions
|
||||||
mle temp;
|
std::swap(mission_list[*top_place], mission_list[i]);
|
||||||
|
|
||||||
temp = mission_list[*top_place];
|
|
||||||
mission_list[*top_place] = mission_list[i];
|
|
||||||
mission_list[i] = temp;
|
|
||||||
++(*top_place);
|
++(*top_place);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue