diff --git a/Src/Orbiter/MfdUser.cpp b/Src/Orbiter/MfdUser.cpp index 52c846441..f2d8413fa 100644 --- a/Src/Orbiter/MfdUser.cpp +++ b/Src/Orbiter/MfdUser.cpp @@ -13,7 +13,7 @@ #include "Psys.h" #include "Nav.h" #include -#include +#include #include #include "Log.h" #include "Util.h" @@ -397,11 +397,11 @@ void GraphMFD::Plot (HDC hDC, int g, int h0, int h1, const char *title) } } if (gf.absc_title[0]) { - ostrstream oss(cbuf, 64); + ostringstream oss(cbuf, 64); oss << gf.absc_title; if (gf.absc_tickscale != 1.0f) oss << " x " << 1.0/gf.absc_tickscale; oss << '\0'; - TextOut (hDC, (x0+x1)/2, y0+(3*ch)/4, oss.str(), strlen(oss.str())); + TextOut (hDC, (x0+x1)/2, y0+(3*ch)/4, oss.str().c_str(), strlen(oss.str().c_str())); } // ordinate ticks/labels @@ -430,11 +430,11 @@ void GraphMFD::Plot (HDC hDC, int g, int h0, int h1, const char *title) SetTextAlign (hDC, TA_CENTER); if (gf.data_title[0]) { SelectDefaultFont (hDC, 2); - ostrstream oss(cbuf, 64); + ostringstream oss(cbuf, 64); oss << gf.data_title; if (gf.data_tickscale != 1.0f) oss << " x " << 1.0/gf.data_tickscale; oss << '\0'; - TextOut (hDC, 0, (y0+y1)/2, oss.str(), strlen(oss.str())); + TextOut (hDC, 0, (y0+y1)/2, oss.str().c_str(), strlen(oss.str().c_str())); } // plot frame diff --git a/Src/Orbiter/Orbiter.cpp b/Src/Orbiter/Orbiter.cpp index 76766ed6b..d4a1e869d 100644 --- a/Src/Orbiter/Orbiter.cpp +++ b/Src/Orbiter/Orbiter.cpp @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include "cmdline.h" diff --git a/Src/Orbiter/Vessel.cpp b/Src/Orbiter/Vessel.cpp index 6af0e58ad..6b3122d0e 100644 --- a/Src/Orbiter/Vessel.cpp +++ b/Src/Orbiter/Vessel.cpp @@ -5554,10 +5554,10 @@ bool Vessel::VCRedrawEvent (int id, int event, SURFHANDLE surf) const bool Vessel::VCMouseEvent (int id, int event, Vector &p) const { - if (modIntf.v && modIntf.v->Version() >= 1) { - VECTOR3 v = _V(p.x,p.y,p.z); - return ((VESSEL2*)modIntf.v)->clbkVCMouseEvent (id, event, v); - } + if (modIntf.v && modIntf.v->Version() >= 1) { + VECTOR3 v = _V(p.x,p.y,p.z); + return ((VESSEL2*)modIntf.v)->clbkVCMouseEvent (id, event, v); + } else return false; } @@ -8851,4 +8851,4 @@ bool VESSEL4::UnregisterMFDMode (int mode) int VESSEL4::clbkNavProcess (int mode) { return mode; -} +} diff --git a/Src/Plugin/Common/Dialog/Graph.cpp b/Src/Plugin/Common/Dialog/Graph.cpp index b5ab5a727..030cbff47 100644 --- a/Src/Plugin/Common/Dialog/Graph.cpp +++ b/Src/Plugin/Common/Dialog/Graph.cpp @@ -13,7 +13,7 @@ #include "Graph.h" #include #include -#include +#include #include "orbitersdk.h" static COLORREF plotcol[MAXPLOT] = { 0x0000ff, 0xff0000, 0x00ff00 }; @@ -232,12 +232,12 @@ void Graph::Refresh (HDC hDC, int w, int h) } SelectObject (hDC, gdi.font[1]); - std::ostrstream oss(cbuf,64); + std::ostringstream oss(cbuf,64); if (m_ylabel.size()) { oss << m_ylabel; if (m_tickscale && m_tickscale != 1.0f) oss << " x " << 1.0/m_tickscale; oss << '\0'; - TextOut (hDC, 0, (y0+y1)/2, oss.str(), strlen(oss.str())); + TextOut (hDC, 0, (y0+y1)/2, oss.str().c_str(), strlen(oss.str().c_str())); } SelectObject (hDC, pfont);