diff base/LogRange.cpp @ 687:06f13a3b9e9e debug-output

Convert many cerrs to DEBUGs
author Chris Cannam
date Mon, 16 May 2011 17:19:09 +0100
parents bdc9bb371a9f
children 1424aa29ae95
line wrap: on
line diff
--- a/base/LogRange.cpp	Thu May 12 17:31:24 2011 +0100
+++ b/base/LogRange.cpp	Mon May 16 17:19:09 2011 +0100
@@ -26,7 +26,7 @@
     if (min > max) std::swap(min, max);
     if (max == min) max = min + 1;
 
-//    std::cerr << "LogRange::mapRange: min = " << min << ", max = " << max << std::endl;
+//    DEBUG << "LogRange::mapRange: min = " << min << ", max = " << max << endl;
 
     if (min >= 0.f) {
 
@@ -35,7 +35,7 @@
         if (min == 0.f) min = std::min(logthresh, max);
         else min = log10f(min);
 
-//        std::cerr << "LogRange::mapRange: positive: min = " << min << ", max = " << max << std::endl;
+//        DEBUG << "LogRange::mapRange: positive: min = " << min << ", max = " << max << endl;
 
     } else if (max <= 0.f) {
         
@@ -46,7 +46,7 @@
         
         std::swap(min, max);
         
-//        std::cerr << "LogRange::mapRange: negative: min = " << min << ", max = " << max << std::endl;
+//        DEBUG << "LogRange::mapRange: negative: min = " << min << ", max = " << max << endl;
 
     } else {
         
@@ -55,7 +55,7 @@
         max = log10f(std::max(max, -min));
         min = std::min(logthresh, max);
 
-//        std::cerr << "LogRange::mapRange: spanning: min = " << min << ", max = " << max << std::endl;
+//        DEBUG << "LogRange::mapRange: spanning: min = " << min << ", max = " << max << endl;
     }
 
     if (min == max) min = max - 1;
@@ -104,8 +104,8 @@
     float sd0 = sd(values, 0, mi);
     float sd1 = sd(values, mi, values.size() - mi);
 
-    std::cerr << "LogRange::useLogScale: sd0 = "
-              << sd0 << ", sd1 = " << sd1 << std::endl;
+    DEBUG << "LogRange::useLogScale: sd0 = "
+              << sd0 << ", sd1 = " << sd1 << endl;
 
     if (sd0 == 0 || sd1 == 0) return false;