From aa931a99ffbe255115f3f8ce57dd38920e0dd60f Mon Sep 17 00:00:00 2001 From: Mark Watkins Date: Sun, 18 Dec 2011 01:12:35 +1000 Subject: [PATCH] Rest of the MSVC++2010 patches --- Graphs/gLineChart.cpp | 1 + SleepLib/calcs.cpp | 4 ++++ SleepLib/loader_plugins/prs1_loader.cpp | 6 +++--- SleepLib/machine.cpp | 2 +- SleepyHeadQT.pro | 10 +++++----- 5 files changed, 14 insertions(+), 9 deletions(-) diff --git a/Graphs/gLineChart.cpp b/Graphs/gLineChart.cpp index 3f3998f2..8d87081e 100644 --- a/Graphs/gLineChart.cpp +++ b/Graphs/gLineChart.cpp @@ -9,6 +9,7 @@ #include #include #include "gLineChart.h" +#include "glcommon.h" #define EXTRA_ASSERTS 1 gLineChart::gLineChart(ChannelID code,QColor col,bool square_plot, bool disable_accel) diff --git a/SleepLib/calcs.cpp b/SleepLib/calcs.cpp index b39959cc..621e6397 100644 --- a/SleepLib/calcs.cpp +++ b/SleepLib/calcs.cpp @@ -5,8 +5,12 @@ */ #include + #include "calcs.h" #include "profiles.h" + +extern double round(double number); + bool SearchApnea(Session *session, qint64 time, qint64 dist=15000) { if (session->SearchEvent(CPAP_Obstructive,time,dist)) return true; diff --git a/SleepLib/loader_plugins/prs1_loader.cpp b/SleepLib/loader_plugins/prs1_loader.cpp index eedf884e..c810ab64 100644 --- a/SleepLib/loader_plugins/prs1_loader.cpp +++ b/SleepLib/loader_plugins/prs1_loader.cpp @@ -1470,9 +1470,9 @@ bool PRS1Loader::OpenWaveforms(SessionID sid, QString filename) lasttimestamp=start; duration=0; int corrupt=0; - char waveform[num_signals][500000]; - int wlength[num_signals]; - qint64 wdur[num_signals]; + char waveform[2][500000]; + int wlength[2]; + qint64 wdur[2]; //EventList *evl[num_signals]; for (int i=0;i #include //#include -//#include +#include #include "machine.h" #include "profiles.h" diff --git a/SleepyHeadQT.pro b/SleepyHeadQT.pro index abecadce..e6e99f11 100644 --- a/SleepyHeadQT.pro +++ b/SleepyHeadQT.pro @@ -96,12 +96,12 @@ win32 { DEFINES += WINVER=0x0501 # needed for mingw to pull in appropriate dbt business...probably a better way to do this LIBS += -lsetupapi - if (win32-msvc2008|win32-msvc2010):equals(TEMPLATE_PREFIX, "vc") { - LIBS += -ladvapi32 - DEFINES += BUILD_WITH_MSVC - } -} +} +if (win32-msvc2008|win32-msvc2010):!equals(TEMPLATE_PREFIX, "vc") { + LIBS += -ladvapi32 + DEFINES += BUILD_WITH_MSVC=1 +} HEADERS += \ SleepLib/machine.h \ SleepLib/machine_loader.h \