Skip to content

Commit b54cfa0

Browse files
committed
fix all but one warning
1 parent 292b059 commit b54cfa0

File tree

5 files changed

+16
-17
lines changed

5 files changed

+16
-17
lines changed

mainwindow.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1698,7 +1698,7 @@ void MainWindow::on_actionCreate_Movie_of_wavefronts_triggered()
16981698
int cnt = 0;
16991699
QSettings set;
17001700
QString lastPath = set.value("lastPath",".").toString();
1701-
int memThreshold = set.value("lowMemoryThreshold",300).toInt();
1701+
//int memThreshold = set.value("lowMemoryThreshold",300).toInt();
17021702
QImage img = m_ogl->m_surface->render(1000,1000);
17031703

17041704
int width = img.width();
@@ -1796,7 +1796,7 @@ void MainWindow::on_actionCreate_Movie_of_wavefronts_triggered()
17961796
QApplication::setOverrideCursor(Qt::WaitCursor);
17971797
QProcess *proc = new QProcess;
17981798
connect(proc, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished),
1799-
[=](int exitCode, QProcess::ExitStatus exitStatus){ qDebug() << "what" << exitStatus; });
1799+
[=](int exitCode, QProcess::ExitStatus exitStatus){ qDebug() << "what" << exitStatus << "code" << exitCode; });
18001800

18011801
proc->setProcessChannelMode(QProcess::MergedChannels);
18021802
proc->setWorkingDirectory(dir);

percentcorrectiondlg.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -201,10 +201,9 @@ void percentCorrectionDlg::makeZones(){
201201

202202
// the profile version needs the null removed and is in output lambda (usually 550);
203203
// zernike based does not need the null removed but needs to use laser wave length
204-
double percentCorrectionDlg::getZernSurface( double RoC, double MirrorRad, std::vector<double> Zernikes, double x, double null = 0.,
204+
double percentCorrectionDlg::getZernSurface( double RoC, double /*MirrorRad*/, std::vector<double> Zernikes, double x, double null = 0.,
205205
bool useavg = false){
206206

207-
double num1 = x / MirrorRad;
208207
arma::rowvec rhov(1), thetav(1);
209208
rhov[0] = x/m_radius; thetav[0] = 0.;
210209
zernikeProcess zp;
@@ -240,7 +239,7 @@ double percentCorrectionDlg::getZernSurface( double RoC, double MirrorRad, std::
240239
else {
241240

242241
// for each spherical term
243-
int z = 8;
242+
unsigned int z = 8;
244243
for(unsigned int j = 6; z < theZs.n_cols; j+=2){
245244

246245
val += Zernikes[z] * theZs(0,z);
@@ -390,13 +389,12 @@ void percentCorrectionDlg::plotProfile(){
390389
}
391390
QPolygonF profile2;
392391
// now plot the m_avg surface
393-
int i = 0;
394392
for(double r = 0; r < m_avg.length(); r += 1. ){
395393

396394
// qDebug() << "r" << r << m_avg[i];
397395
double y = m_avg[r].y();//getZernSurface(m_roc, m_radius, surfs[i]->zernvalues, fabs(r), true);
398396

399-
double sphery = m_roc - sqrt(pow(m_roc, 2.0) - pow(r, 2.0));
397+
//double sphery = m_roc - sqrt(pow(m_roc, 2.0) - pow(r, 2.0));
400398
//y -= sphery;
401399
//y /= m_lambda_nm * .5E-6;
402400
profile2 << QPointF(m_avg[r].x(), y);

profileplot.cpp

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ void ProfilePlot::setDefocusValue(double val){
332332
m_plot->replot();
333333
}
334334
}
335-
QPolygonF ProfilePlot::createAverageProfile(double umnits, wavefront *wf, bool removeNull = false){
335+
QPolygonF ProfilePlot::createAverageProfile(double /*umnits*/, wavefront * /*wf*/, bool /*removeNull = false*/){
336336
surfaceAnalysisTools *saTools = surfaceAnalysisTools::get_Instance();
337337
QList<int> list = saTools->SelectedWaveFronts();
338338
QPolygonF avg;
@@ -518,7 +518,7 @@ void ProfilePlot::populate()
518518
compass->setGeometry(QRect(80,80,70,70));
519519
QString tmp("nanometers");
520520
if (m_showNm == 1.)
521-
tmp = QString().sprintf("waves of %6.1lf nm",outputLambda);
521+
tmp = QString("waves of %1 nm").arg(outputLambda, 6, 'f', 1);
522522
m_plot->setAxisTitle( m_plot->yLeft, "Error in " + tmp );
523523
m_plot->setAxisTitle( m_plot->xBottom, "Radius mm" );
524524

@@ -536,7 +536,9 @@ void ProfilePlot::populate()
536536

537537
if (m_wf->m_outside.m_radius > 0 && settings.value("GBlur", false).toBool()){
538538
double val = .01 * (m_wf->diameter) * smoothing;
539-
QString t = QString().sprintf("Surface Smoothing diameter %6.2lf%% of surface diameter %6.1lf mm", smoothing , val );
539+
QString t = QString("Surface Smoothing diameter %1% of surface diameter %2 mm")
540+
.arg(smoothing, 6, 'f', 2)
541+
.arg(val, 6, 'f', 1);
540542
QwtText title(t);
541543
title.setRenderFlags( Qt::AlignHCenter | Qt::AlignTop );
542544

@@ -587,7 +589,6 @@ void ProfilePlot::populate()
587589

588590
surfaceAnalysisTools *saTools = surfaceAnalysisTools::get_Instance();
589591
QList<int> list = saTools->SelectedWaveFronts();
590-
bool firstPlot = true;
591592
QColor penColor = QColor("blue");
592593

593594
for (int indx = 0; indx < list.size(); ++indx){
@@ -789,7 +790,6 @@ void ProfilePlot::contourPointSelected(const QPointF &pos){
789790
double dely = pos.y() - m_wf->data.cols/2;
790791

791792
double angle = atan2(delx,dely); // swaped x and y to rotate by 90 deg.
792-
double angle2 = angle;
793793
const double twopi = M_PI * 2.;
794794
// force 0 to 360
795795
if (angle < 0)
@@ -806,11 +806,13 @@ void ProfilePlot::contourPointSelected(const QPointF &pos){
806806
}
807807
void ProfilePlot::showCorrection(){
808808
if (m_wf == 0)
809+
{
809810
return;
811+
}
810812

811-
m_pcdlg->show();
812-
m_pcdlg->raise();
813-
make_correction_graph();
813+
m_pcdlg->show();
814+
m_pcdlg->raise();
815+
make_correction_graph();
814816

815817

816818
}

zernikeprocess.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1366,7 +1366,7 @@ arma::mat zernikeProcess::zapmC(const arma::rowvec& rho, const arma::rowvec& the
13661366

13671367

13681368
void zernikeProcess::initGrid(int width, double radius, double cx, double cy, int maxOrder,
1369-
double insideRad){
1369+
double /*insideRad*/){
13701370

13711371
// if grid or maxOrder is different then update values.
13721372
double obsPercent = 0.;

zernikesmoothingdlg.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ cv::Mat makeSurfaceFromZerns(int width, zernikeProcess &zp, std::vector<double>
9292
}
9393
}
9494
else { // use only spherical terms.
95-
unsigned int z = 0;
9695
for (unsigned long long i = 4; i < zp.m_zerns.n_rows; ++i){
9796

9897
double S1 = 0.0;

0 commit comments

Comments
 (0)