[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kalzium] src/calculator: Initialize variable
From:       Christoph Feck <christoph () maxiom ! de>
Date:       2014-12-18 14:25:16
Message-ID: E1Y1c0y-0004Ye-Q6 () scm ! kde ! org
[Download RAW message or body]

Git commit be5dd2789a90bac2bd7ec4c9f8989273c486b20a by Christoph Feck.
Committed on 18/12/2014 at 14:24.
Pushed by cfeck into branch 'master'.

Initialize variable

... instead of just adding a kDebug() to print its
uninitialized value.

M  +1    -2    src/calculator/titrationCalculator.cpp

http://commits.kde.org/kalzium/be5dd2789a90bac2bd7ec4c9f8989273c486b20a

diff --git a/src/calculator/titrationCalculator.cpp b/src/calculator/titrationCalculator.cpp
index 9d2775a..af747e4 100644
--- a/src/calculator/titrationCalculator.cpp
+++ b/src/calculator/titrationCalculator.cpp
@@ -193,8 +193,7 @@ void titrationCalculator::plot()
         } else if (a < 0) {
             d = py[totaldata - 1] - (a / 2);
         }
-        double cn;
-        kDebug() << cn;
+        double cn = 0.0;
         int th = 0;
         for (int i = 1; i < (totaldata - 1); ++i) {
             //now i'm using the value of the points to fit the curve
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic