cppcheck reported: [sklearn/svm/src/libsvm/svm.cpp:1880] -> [sklearn/svm/src/libsvm/svm.cpp:1875]: (style) Found duplicate branches for 'if' and 'else'.
Signed-off-by: Thomas Jarosch <[email protected]> --- sklearn/svm/src/libsvm/svm.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) I just downloaded the git tree as I wanted to install the SimpleCV dependency from source. So I thought it might be a nice idea to run cppcheck on it... Note: This is untested. Please CC: comments, I'm not on the list. diff --git a/sklearn/svm/src/libsvm/svm.cpp b/sklearn/svm/src/libsvm/svm.cpp index 7a4e265..a7a1133 100644 --- a/sklearn/svm/src/libsvm/svm.cpp +++ b/sklearn/svm/src/libsvm/svm.cpp @@ -1874,7 +1874,7 @@ static decision_function svm_train_one( ++nSV; if(prob->y[i] > 0) { - if(fabs(alpha[i]) >= si.upper_bound[i]) + if(fabs(prob->y[i]) >= si.upper_bound[i]) ++nBSV; } else -- 1.7.11.7 ------------------------------------------------------------------------------ Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and much more. Get web development skills now with LearnDevNow - 350+ hours of step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122812 _______________________________________________ Scikit-learn-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
