summaryrefslogtreecommitdiff
path: root/noncore/tools/calc2/engine.cpp
Unidiff
Diffstat (limited to 'noncore/tools/calc2/engine.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/tools/calc2/engine.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/noncore/tools/calc2/engine.cpp b/noncore/tools/calc2/engine.cpp
index e843e29..74cd701 100644
--- a/noncore/tools/calc2/engine.cpp
+++ b/noncore/tools/calc2/engine.cpp
@@ -19,10 +19,17 @@
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "engine.h" 21#include "engine.h"
22
23/* OPIE */
24#include <opie2/odebug.h>
25
26/* QT */
22#include <qstring.h> 27#include <qstring.h>
23#include <math.h>
24#include <qlcdnumber.h> 28#include <qlcdnumber.h>
25 29
30/* STD */
31#include <math.h>
32
26Data Engine::evalStack (Data num, bool inbrace = FALSE) 33Data Engine::evalStack (Data num, bool inbrace = FALSE)
27{ 34{
28 if (state != sError) { 35 if (state != sError) {
@@ -42,7 +49,7 @@ Data Engine::evalStack (Data num, bool inbrace = FALSE)
42 49
43// Error-check ( change this to work for all types ) 50// Error-check ( change this to work for all types )
44 if (isnan (num.dbl) || isinf (num.dbl)) { 51 if (isnan (num.dbl) || isinf (num.dbl)) {
45 qDebug ("bad result from operation"); 52 odebug << "bad result from operation" << oendl;
46 state = sError; 53 state = sError;
47 clearData(&num); 54 clearData(&num);
48 return num; 55 return num;
@@ -113,7 +120,7 @@ void Engine::pushValue (char v)
113 state = sAppend; 120 state = sAppend;
114 pushValue (v); 121 pushValue (v);
115 } else if (state == sError) { 122 } else if (state == sError) {
116 qDebug ("in error state"); 123 odebug << "in error state" << oendl;
117 return; 124 return;
118 } 125 }
119} 126}