r362: no message
[ctsim.git] / src / views.cpp
index cf8497bd9b894b7237275c67a5b89c36dbd02071..72ed48dd8a4f2fd3abfb758aee970ac39adc8d8c 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: views.cpp,v 1.54 2001/01/07 23:18:13 kevin Exp $
+**  $Id: views.cpp,v 1.56 2001/01/08 02:02:18 kevin Exp $
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License (version 2) as
@@ -1056,7 +1056,8 @@ ImageFileView::OnPlotRow (wxCommandEvent& event)
   if (v != NULL && yCursor < ny) {
     double* pX = new double [nx];
     double* pYReal = new double [nx];
-    double *pYImag, *pYMag;
+    double *pYImag = NULL;
+    double *pYMag = NULL;
     if (rIF.isComplex()) {
       pYImag = new double [nx];
       pYMag = new double [nx];
@@ -1103,7 +1104,7 @@ ImageFileView::OnPlotRow (wxCommandEvent& event)
         rPlotFile.addColumn (2, pYImag);
         rPlotFile.addColumn (3, pYMag);
       }
-      for (int iL = 0; iL < rIF.nLabels(); iL++)
+      for (unsigned int iL = 0; iL < rIF.nLabels(); iL++)
         rPlotFile.addDescription (rIF.labelGet(iL).getLabelString().c_str());
       os << " Plot of " << GetDocument()->GetFirstView()->GetFrame()->GetTitle().c_str();
       *theApp->getLog() << os.str().c_str() << "\n";
@@ -1139,7 +1140,8 @@ ImageFileView::OnPlotCol (wxCommandEvent& event)
   if (v != NULL && xCursor < nx) {
     double* pX = new double [ny];
     double* pYReal = new double [ny];
-    double *pYImag, *pYMag;
+    double* pYImag = NULL;
+    double* pYMag = NULL;
     if (rIF.isComplex()) {
       pYImag = new double [ny];
       pYMag = new double [ny];
@@ -1186,7 +1188,7 @@ ImageFileView::OnPlotCol (wxCommandEvent& event)
         rPlotFile.addColumn (2, pYImag);
         rPlotFile.addColumn (3, pYMag);
       }
-      for (int iL = 0; iL < rIF.nLabels(); iL++)
+      for (unsigned int iL = 0; iL < rIF.nLabels(); iL++)
         rPlotFile.addDescription (rIF.labelGet(iL).getLabelString().c_str());
       os << " Plot of " << GetDocument()->GetFirstView()->GetFrame()->GetTitle().c_str();
       *theApp->getLog() << os.str().c_str() << "\n";
@@ -1460,19 +1462,19 @@ ImageFileView::OnCompareCol (wxCommandEvent& event)
 
         unsigned int iL;
         for (iL = 0; iL < rIF.nLabels(); iL++) {
-          std::string s = GetDocument()->GetFirstView()->GetFrame()->GetTitle();
+          std::string s = GetDocument()->GetFirstView()->GetFrame()->GetTitle().c_str();
           s += ": ";
           s += rIF.labelGet(iL).getLabelString();
           rPlotFile.addDescription (s.c_str());
         }
         for (iL = 0; iL < rIF.nLabels(); iL++) {
-          std::string s = pCompareDoc->GetFirstView()->GetFrame()->GetTitle();
+          std::string s = pCompareDoc->GetFirstView()->GetFrame()->GetTitle().c_str();
           s += ": ";
           s += rCompareIF.labelGet(iL).getLabelString();
           rPlotFile.addDescription (s.c_str());
         }
-        os << " Between " << GetDocument()->GetFirstView()->GetFrame()->GetTitle() << " and "
-          << pCompareDoc->GetFirstView()->GetFrame()->GetTitle();
+        os << " Between " << GetDocument()->GetFirstView()->GetFrame()->GetTitle().c_str() << " and "
+          << pCompareDoc->GetFirstView()->GetFrame()->GetTitle().c_str();
         *theApp->getLog() << os.str().c_str() << "\n";
         rPlotFile.addDescription (os.str().c_str());
       }
@@ -1550,19 +1552,19 @@ ImageFileView::OnCompareRow (wxCommandEvent& event)
         rPlotFile.addColumn (2, pY2);
         unsigned int iL;
         for (iL = 0; iL < rIF.nLabels(); iL++) {
-          std::string s = GetDocument()->GetFirstView()->GetFrame()->GetTitle();
+          std::string s = GetDocument()->GetFirstView()->GetFrame()->GetTitle().c_str();
           s += ": ";
           s += rIF.labelGet(iL).getLabelString();
           rPlotFile.addDescription (s.c_str());
         }
         for (iL = 0; iL < rIF.nLabels(); iL++) {
-          std::string s = pCompareDoc->GetFirstView()->GetFrame()->GetTitle();
+          std::string s = pCompareDoc->GetFirstView()->GetFrame()->GetTitle().c_str();
           s += ": ";
           s += rCompareIF.labelGet(iL).getLabelString();
           rPlotFile.addDescription (s.c_str());
         }
-        os << " Between " << GetDocument()->GetFirstView()->GetFrame()->GetTitle() << " and "
-          << pCompareDoc->GetFirstView()->GetFrame()->GetTitle();
+        os << " Between " << GetDocument()->GetFirstView()->GetFrame()->GetTitle().c_str() << " and "
+          << pCompareDoc->GetFirstView()->GetFrame()->GetTitle().c_str();
         *theApp->getLog() << os.str().c_str() << "\n";
         rPlotFile.addDescription (os.str().c_str());
       }