X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FCockpit%2Fhud.hxx;h=50365f35aaff4f5c54ca1e10d05f7865f060c08f;hb=029dda3297e3697438e1a58188527cbae90beebe;hp=5b9530327d2ffcd4c8b69274fe589e21fe897442;hpb=fee003e8cc17f0aa9a1e9280dd823d20e231e967;p=flightgear.git diff --git a/src/Cockpit/hud.hxx b/src/Cockpit/hud.hxx index 5b9530327..50365f35a 100644 --- a/src/Cockpit/hud.hxx +++ b/src/Cockpit/hud.hxx @@ -54,8 +54,8 @@ #include #include +#include #include -#include #include #include
#include
@@ -251,7 +251,7 @@ public: ~fgLineSeg2D() {} - void draw() + void draw() const { glVertex2f(x0, y0); glVertex2f(x1, y1); @@ -260,7 +260,7 @@ public: class DrawLineSeg2D { public: - void operator() (fgLineSeg2D elem) const { + void operator() (const fgLineSeg2D& elem) const { elem.draw(); } }; @@ -375,7 +375,7 @@ class fgLineList { public: fgLineList( void ) {} ~fgLineList( void ) {} - void add( fgLineSeg2D seg ) { List.push_back(seg); } + void add( const fgLineSeg2D& seg ) { List.push_back(seg); } void erase( void ) { List.erase( List.begin(), List.end() ); } void draw( void ) { glBegin(GL_LINES); @@ -392,7 +392,7 @@ public: ~fgTextList( void ) {} void setFont( fntRenderer *Renderer ) { Font = Renderer; } - void add( fgText String ) { List.push_back(String); } + void add( const fgText& String ) { List.push_back(String); } void erase( void ) { List.erase( List.begin(), List.end() ); } void draw( void ) { @@ -424,7 +424,7 @@ inline void Text( fgTextList &List, float x, float y, char *s) List.add( fgText( x, y, s) ); } -inline void Text( fgTextList &List, fgText &me) +inline void Text( fgTextList &List, const fgText &me) { List.add(me); } @@ -688,9 +688,9 @@ typedef lon_label * pLonlabel; class runway_instr : public instr_item { private: - void boundPoint(sgdVec3 v, sgdVec3 m); - bool boundOutsidePoints(sgdVec3 v, sgdVec3 m); - bool drawLine(sgdVec3 a1, sgdVec3 a2, sgdVec3 p1, sgdVec3 p2); + void boundPoint(const sgdVec3& v, sgdVec3& m); + bool boundOutsidePoints(sgdVec3& v, sgdVec3& m); + bool drawLine(const sgdVec3& a1, const sgdVec3& a2, const sgdVec3& p1, const sgdVec3& p2); void drawArrow(); bool get_active_runway(FGRunway& rwy); void get_rwy_points(sgdVec3 *points); @@ -698,7 +698,7 @@ private: sgdVec3 points3d[6],points2d[6]; double mm[16],pm[16], arrowScale, arrowRad, lnScale, scaleDist, default_pitch, default_heading; - int view[4]; + GLint view[4]; FGRunway runway; FGViewer* cockpit_view; unsigned short stippleOut,stippleCen; @@ -974,7 +974,7 @@ private: fgLineList StippleLineList; public: - HudLadder( string name, + HudLadder( const string& name, int x, int y, UINT width,