[dasher] Avoid lack of abs(long long int) (and comment out unused m_iSigBiasPixels)



commit f5114e14de64e754e76a3a6bd6b5d9265473b331
Author: Patrick Welche <prlw1 cam ac uk>
Date:   Thu Jan 13 18:26:33 2011 +0000

    Avoid lack of abs(long long int) (and comment out unused m_iSigBiasPixels)

 Src/DasherCore/DefaultFilter.cpp |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/Src/DasherCore/DefaultFilter.cpp b/Src/DasherCore/DefaultFilter.cpp
index 82cff35..4d92fe8 100644
--- a/Src/DasherCore/DefaultFilter.cpp
+++ b/Src/DasherCore/DefaultFilter.cpp
@@ -262,9 +262,9 @@ void CDefaultFilter::ApplyOffset(myint &iDasherX, myint &iDasherY) {
     
       // 'Conditions A', as specified by DJCM.  Only make the auto-offset
       // change if we're past the significance boundary.
-      int m_iSigBiasPixels(GetLongParameter(LP_MAX_Y)/2);
+      //int m_iSigBiasPixels(GetLongParameter(LP_MAX_Y)/2);
 
-      if(abs(m_iSum) > GetLongParameter(LP_MAX_Y)/2)
+      if (((m_iSum>0)?m_iSum:-m_iSum) > GetLongParameter(LP_MAX_Y)/2)
         SetLongParameter(LP_TARGET_OFFSET, GetLongParameter(LP_TARGET_OFFSET) + ((m_iSum>0) ? -1 : 1));
       //TODO, "else return" - check effectiveness with/without?
       // old code exited now if neither above cases applied,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]