[mlpack-git] master, mlpack-1.0.x: Use const reference parameter so it works with temporaries too. (dde19f3)

gitdub at big.cc.gt.atl.ga.us gitdub at big.cc.gt.atl.ga.us
Thu Mar 5 21:45:50 EST 2015


Repository : https://github.com/mlpack/mlpack

On branches: master,mlpack-1.0.x
Link       : https://github.com/mlpack/mlpack/compare/904762495c039e345beba14c1142fd719b3bd50e...f94823c800ad6f7266995c700b1b630d5ffdcf40

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

commit dde19f38a6ecce4b31fbb80ffe6ef2824b50a981
Author: Ryan Curtin <ryan at ratml.org>
Date:   Mon Mar 31 15:19:23 2014 +0000

    Use const reference parameter so it works with temporaries too.


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

dde19f38a6ecce4b31fbb80ffe6ef2824b50a981
 src/mlpack/core/util/nulloutstream.hpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mlpack/core/util/nulloutstream.hpp b/src/mlpack/core/util/nulloutstream.hpp
index 48e6952..ac92b81 100644
--- a/src/mlpack/core/util/nulloutstream.hpp
+++ b/src/mlpack/core/util/nulloutstream.hpp
@@ -70,7 +70,7 @@ class NullOutStream
 
   //! Does nothing.
   template<typename T>
-  NullOutStream& operator<<(T&) { return *this; }
+  NullOutStream& operator<<(const T&) { return *this; }
 };
 
 } // namespace util



More information about the mlpack-git mailing list