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

Convert many cerrs to DEBUGs
author Chris Cannam
date Mon, 16 May 2011 17:19:09 +0100
parents b4a8d8221eaf
children 1424aa29ae95
line wrap: on
line diff
--- a/base/RangeMapper.cpp	Thu May 12 17:31:24 2011 +0100
+++ b/base/RangeMapper.cpp	Mon May 16 17:19:09 2011 +0100
@@ -43,8 +43,8 @@
                * (m_maxpos - m_minpos));
     if (position < m_minpos) position = m_minpos;
     if (position > m_maxpos) position = m_maxpos;
-//    std::cerr << "LinearRangeMapper::getPositionForValue: " << value << " -> "
-//              << position << " (minpos " << m_minpos << ", maxpos " << m_maxpos << ", minval " << m_minval << ", maxval " << m_maxval << ")" << std::endl;
+//    DEBUG << "LinearRangeMapper::getPositionForValue: " << value << " -> "
+//              << position << " (minpos " << m_minpos << ", maxpos " << m_maxpos << ", minval " << m_minval << ", maxval " << m_maxval << ")" << endl;
     if (m_inverted) return m_maxpos - position;
     else return position;
 }
@@ -58,8 +58,8 @@
          * (m_maxval - m_minval));
     if (value < m_minval) value = m_minval;
     if (value > m_maxval) value = m_maxval;
-//    std::cerr << "LinearRangeMapper::getValueForPosition: " << position << " -> "
-//              << value << " (minpos " << m_minpos << ", maxpos " << m_maxpos << ", minval " << m_minval << ", maxval " << m_maxval << ")" << std::endl;
+//    DEBUG << "LinearRangeMapper::getValueForPosition: " << position << " -> "
+//              << value << " (minpos " << m_minpos << ", maxpos " << m_maxpos << ", minval " << m_minval << ", maxval " << m_maxval << ")" << endl;
     return value;
 }
 
@@ -109,8 +109,8 @@
     int position = (log10(value) - m_minlog) * m_ratio + m_minpos;
     if (position < m_minpos) position = m_minpos;
     if (position > m_maxpos) position = m_maxpos;
-//    std::cerr << "LogRangeMapper::getPositionForValue: " << value << " -> "
-//              << position << " (minpos " << m_minpos << ", maxpos " << m_maxpos << ", ratio " << m_ratio << ", minlog " << m_minlog << ")" << std::endl;
+//    DEBUG << "LogRangeMapper::getPositionForValue: " << value << " -> "
+//              << position << " (minpos " << m_minpos << ", maxpos " << m_maxpos << ", ratio " << m_ratio << ", minlog " << m_minlog << ")" << endl;
     if (m_inverted) return m_maxpos - position;
     else return position;
 }
@@ -120,8 +120,8 @@
 {
     if (m_inverted) position = m_maxpos - position;
     float value = powf(10, (position - m_minpos) / m_ratio + m_minlog);
-//    std::cerr << "LogRangeMapper::getValueForPosition: " << position << " -> "
-//              << value << " (minpos " << m_minpos << ", maxpos " << m_maxpos << ", ratio " << m_ratio << ", minlog " << m_minlog << ")" << std::endl;
+//    DEBUG << "LogRangeMapper::getValueForPosition: " << position << " -> "
+//              << value << " (minpos " << m_minpos << ", maxpos " << m_maxpos << ", ratio " << m_ratio << ", minlog " << m_minlog << ")" << endl;
     return value;
 }