[mlpack-git] master: Switch to C++ headers instead of old C-style. Fixes #522. (9c1bcf6)

gitdub at mlpack.org gitdub at mlpack.org
Tue Feb 16 22:02:32 EST 2016


Repository : https://github.com/mlpack/mlpack
On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/46e0a233c29ae638ba60eb224826168516c0ec4e...9c1bcf6d8a88d8b3e4271d96859bc843f244255c

>---------------------------------------------------------------

commit 9c1bcf6d8a88d8b3e4271d96859bc843f244255c
Author: Ryan Curtin <ryan at ratml.org>
Date:   Tue Feb 16 22:02:32 2016 -0500

    Switch to C++ headers instead of old C-style.  Fixes #522.
    
    Apparently I never got the memo that I should be using cmath instead of math.h
    (and cstdio instead of stdio.h, and so forth).


>---------------------------------------------------------------

9c1bcf6d8a88d8b3e4271d96859bc843f244255c
 src/mlpack/prereqs.hpp | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/mlpack/prereqs.hpp b/src/mlpack/prereqs.hpp
index 7b859d7..5b93936 100644
--- a/src/mlpack/prereqs.hpp
+++ b/src/mlpack/prereqs.hpp
@@ -14,19 +14,19 @@
 #endif
 
 // Next, standard includes.
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <limits.h>
-#include <float.h>
-#include <stdint.h>
+#include <cstdlib>
+#include <cstdio>
+#include <cstring>
+#include <cctype>
+#include <climits>
+#include <cfloat>
+#include <cstdint>
 #include <iostream>
 #include <stdexcept>
 
 // Defining _USE_MATH_DEFINES should set M_PI.
 #define _USE_MATH_DEFINES
-#include <math.h>
+#include <cmath>
 
 // For tgamma().
 #include <boost/math/special_functions/gamma.hpp>




More information about the mlpack-git mailing list