From c1e735c1b42b28bf3ea0cecc5760958fd5bfed13 Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Fri, 17 Nov 2017 08:46:04 +0100 Subject: [PATCH] fixed a few warnings --- slsDetectorGui/include/qDebugStream.h | 2 +- slsDetectorGui/include/qDrawPlot.h | 2 +- slsDetectorGui/src/qDrawPlot.cpp | 29 ++++++++++++++------------- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/slsDetectorGui/include/qDebugStream.h b/slsDetectorGui/include/qDebugStream.h index 2c728dd25..9c47d43c0 100644 --- a/slsDetectorGui/include/qDebugStream.h +++ b/slsDetectorGui/include/qDebugStream.h @@ -87,7 +87,7 @@ protected: m_string.append(p, p + n); //changed from uint because of 64 bit - int pos = 0; + unsigned int pos = 0; while (pos != string::npos){ pos = m_string.find('\n'); diff --git a/slsDetectorGui/include/qDrawPlot.h b/slsDetectorGui/include/qDrawPlot.h index 10393b386..9cb143e1f 100644 --- a/slsDetectorGui/include/qDrawPlot.h +++ b/slsDetectorGui/include/qDrawPlot.h @@ -408,7 +408,7 @@ unsigned int nPixelsX; /** Number of angle Pixels in X Axis */ int nAnglePixelsX; /** Number of pixel bins in Y Axis */ -int nPixelsY; +unsigned int nPixelsY; /** Min Pixel number for Y Axis*/ double minPixelsY; /** Max Pixel number for Y Axis*/ diff --git a/slsDetectorGui/src/qDrawPlot.cpp b/slsDetectorGui/src/qDrawPlot.cpp index 6bdc4b37f..4f798da61 100644 --- a/slsDetectorGui/src/qDrawPlot.cpp +++ b/slsDetectorGui/src/qDrawPlot.cpp @@ -290,7 +290,7 @@ void qDrawPlot::SetupWidgetWindow(){ nHists = 1; if(histXAxis) delete [] histXAxis; histXAxis = new double [nPixelsX]; if(histYAxis[0]) delete [] histYAxis[0];histYAxis[0] = new double [nPixelsX]; - for(unsigned int px=0;px<(int)nPixelsX;px++) {histXAxis[px] = px;histYAxis[0][px] = 0;} + for(unsigned int px=0;pxSetXTitle("X Axis"); plot1D->SetYTitle("Y Axis"); @@ -541,7 +541,7 @@ void qDrawPlot::SetScanArgument(int scanArg){ //get #scansets for level 0 and level 1 int numScan0 = myDet->getScanSteps(0); numScan0 = ((numScan0==0)?1:numScan0); int numScan1 = myDet->getScanSteps(1); numScan1 = ((numScan1==0)?1:numScan1); - int numPos=myDet->getPositions(); + //int numPos=myDet->getPositions(); number_of_exposures = number_of_frames * numScan0 * numScan1; if(anglePlot) number_of_exposures = numScan0 * numScan1;// * numPos; @@ -594,11 +594,11 @@ void qDrawPlot::SetScanArgument(int scanArg){ if(lastImageArray) delete [] lastImageArray; lastImageArray = new double[nPixelsY*nPixelsX]; //initializing 1d x axis - for(unsigned int px=0;px<(int)nPixelsX;px++) histXAxis[px] = px;/*+10;*/ + for(unsigned int px=0;px= 0)){//if(histogramSamples[j].interval.contains(data->values[i])) value = (int) histTrimbits[i]; histogramSamples[value].value += 1;