Skip to content

Commit

Permalink
corrections for msvc
Browse files Browse the repository at this point in the history
  • Loading branch information
seandepagnier committed Jun 1, 2016
1 parent 0262a9a commit 0724ae2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/BoatDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ void BoatDialog::OnPaintPlot(wxPaintEvent& event)

static int CalcPolarPoints(wxPoint p0, wxPoint p1)
{
return floor(fabs(p0.x - p1.x) / 5) + 1;
return floor(fabs((double)p0.x - p1.x) / 5) + 1;
}

void BoatDialog::OnPaintCrossOverChart(wxPaintEvent& event)
Expand Down Expand Up @@ -769,7 +769,7 @@ void BoatDialog::OnPolarSelected()

void BoatDialog::OnUpdatePlot()
{
bool vert = m_orientation[m_cPlotType->GetSelection()];
int vert = m_orientation[m_cPlotType->GetSelection()];
m_cbOrientation->SetValue(vert);
if(m_fgSizer->GetRows() != vert) {
m_fgSizer->SetRows(vert);
Expand Down Expand Up @@ -1015,7 +1015,7 @@ void BoatDialog::RepopulatePolars()
// m_lPolars->SetColumnWidth(spFILENAME, wxLIST_AUTOSIZE);
// m_lPolars->SetColumnWidth(spFILENAME, 80);

bool enable = m_Boat.Polars.size();
int enable = m_Boat.Polars.size();
m_bRemovePolar->Enable(enable);
}

Expand Down
2 changes: 1 addition & 1 deletion src/BoatDialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class BoatDialog : public BoatDialogBase
double m_PlotScale;
int m_MouseW;

bool m_orientation[2];
int m_orientation[2];

bool m_CrossOverRegenerate;
CrossOverGenerationThread *m_CrossOverGenerationThread;
Expand Down
6 changes: 5 additions & 1 deletion src/PolygonRegion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@

#include "PolygonRegion.h"

#if !defined(snprintf) && defined(_MSC_VER)
#define snprintf _snprintf
#endif

Contour::Contour(const std::list<Point> &in_points)
{
n = in_points.size();
Expand Down Expand Up @@ -387,7 +391,7 @@ TESStesselator* PolygonRegion::Tesselate(bool triangles)
TESStesselator *tess = tessNewTess(&ma);

PutContours(tess, false);
bool success;
int success;
if(triangles)
success = tessTesselate(tess, TESS_WINDING_POSITIVE, TESS_POLYGONS, 3, 2, 0);
else
Expand Down

0 comments on commit 0724ae2

Please sign in to comment.