X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FCockpit%2Fhud_rwy.cxx;h=c1a938a9fea4f058dcbaa2c6976c3a7b50699f48;hb=029dda3297e3697438e1a58188527cbae90beebe;hp=880a0978fa2c885c4cc013a01faf7ee29cf87284;hpb=2631cf9cc5b6abe3c8b3ee18e78e7f9269b43449;p=flightgear.git diff --git a/src/Cockpit/hud_rwy.cxx b/src/Cockpit/hud_rwy.cxx index 880a0978f..c1a938a9f 100644 --- a/src/Cockpit/hud_rwy.cxx +++ b/src/Cockpit/hud_rwy.cxx @@ -193,7 +193,7 @@ void runway_instr::get_rwy_points(sgdVec3 *points3d) { center = currentCenter; } -bool runway_instr::drawLine(sgdVec3 a1, sgdVec3 a2, sgdVec3 point1, sgdVec3 point2) { +bool runway_instr::drawLine(const sgdVec3& a1, const sgdVec3& a2, const sgdVec3& point1, const sgdVec3& point2) { sgdVec3 p1, p2; sgdCopyVec3(p1, point1); sgdCopyVec3(p2, point2); @@ -254,7 +254,7 @@ bool runway_instr::drawLine(sgdVec3 a1, sgdVec3 a2, sgdVec3 point1, sgdVec3 poin return (p1Valid && p2Valid); } -void runway_instr::boundPoint(sgdVec3 v, sgdVec3 m) { +void runway_instr::boundPoint(const sgdVec3& v, sgdVec3& m) { double y = v[1]; if(m[1] < v[1]) { y = location.bottom; @@ -279,7 +279,7 @@ void runway_instr::boundPoint(sgdVec3 v, sgdVec3 m) { } } -bool runway_instr::boundOutsidePoints(sgdVec3 v, sgdVec3 m) { +bool runway_instr::boundOutsidePoints(sgdVec3& v, sgdVec3& m) { bool pointsInvalid = (v[1]>location.top && m[1]>location.top) || (v[1]location.right && m[0]>location.right) || @@ -351,9 +351,7 @@ bool runway_instr::boundOutsidePoints(sgdVec3 v, sgdVec3 m) { } void runway_instr::drawArrow() { - Point3D ac,rwy; - memset(&ac,0,sizeof(ac)); - memset(&rwy,0,sizeof(rwy)); + Point3D ac(0.0), rwy(0.0); ac.setlat(current_aircraft.fdm_state->get_Latitude_deg()); ac.setlon(current_aircraft.fdm_state->get_Longitude_deg()); rwy.setlat(runway._lat);