Fix all remaining compiler warnings
[ctsim.git] / src / views.cpp
index 3411a45f67061e52f7970f54c35baff9149db003..7e6de1d411250a42918c0336e38a3667429935d6 100644 (file)
@@ -340,7 +340,7 @@ ImageFileView::OnScaleMinMax (wxCommandEvent& event)
 {
   const ImageFile& rIF = GetDocument()->getImageFile();
   double min, max;
-  if (! m_bMinSpecified && ! m_bMaxSpecified)
+  if (! m_bMinSpecified || ! m_bMaxSpecified)
     rIF.getMinMax (min, max);
 
   if (m_bMinSpecified)
@@ -1312,7 +1312,7 @@ ImageFileView::OnExport (wxCommandEvent& event)
 
       const wxString& strFilename = wxFileSelector (_T("Export Filename"), _T(""),
                                                     _T(""), strExt, strWildcard, wxFD_OVERWRITE_PROMPT | wxFD_SAVE);
-      if (strFilename.Length() > 0) {
+      if (! strFilename.empty()) {
         rIF.exportImage (strFormatName.mb_str(wxConvUTF8), strFilename.mb_str(wxConvUTF8), 1, 1, m_dMinPixel, m_dMaxPixel);
         *theApp->getLog() << _T("Exported file ") << strFilename << _T("\n");
       }