Statements following return, break, continue, goto or throw will never be executed.
This commit is contained in:
parent
4571769ee7
commit
36f8036ce1
1 changed files with 4 additions and 4 deletions
|
@ -588,11 +588,11 @@ double FGAIShip::getCourse(double lat, double lon, double lat2, double lon2) con
|
||||||
//calculate the bearing and range of the second pos from the first
|
//calculate the bearing and range of the second pos from the first
|
||||||
geo_inverse_wgs_84(lat, lon, lat2, lon2, &course, &recip, &distance);
|
geo_inverse_wgs_84(lat, lon, lat2, lon2, &course, &recip, &distance);
|
||||||
if (tgt_speed >= 0) {
|
if (tgt_speed >= 0) {
|
||||||
return course;
|
|
||||||
SG_LOG(SG_AI, SG_DEBUG, "AIShip: course " << course);
|
SG_LOG(SG_AI, SG_DEBUG, "AIShip: course " << course);
|
||||||
|
return course;
|
||||||
} else {
|
} else {
|
||||||
return recip;
|
|
||||||
SG_LOG(SG_AI, SG_DEBUG, "AIShip: recip " << recip);
|
SG_LOG(SG_AI, SG_DEBUG, "AIShip: recip " << recip);
|
||||||
|
return recip;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue