[mlpack-git] master, mlpack-1.0.x: Whatever bug used to be here before isn't here now. (93beaa8)

gitdub at big.cc.gt.atl.ga.us gitdub at big.cc.gt.atl.ga.us
Thu Mar 5 21:45:48 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 93beaa816f5af430d99be69b19e10f1eedb3f4de
Author: Ryan Curtin <ryan at ratml.org>
Date:   Mon Mar 31 13:51:10 2014 +0000

    Whatever bug used to be here before isn't here now.


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

93beaa816f5af430d99be69b19e10f1eedb3f4de
 src/mlpack/core/util/nulloutstream.hpp | 47 ++++++++++++++--------------------
 1 file changed, 19 insertions(+), 28 deletions(-)

diff --git a/src/mlpack/core/util/nulloutstream.hpp b/src/mlpack/core/util/nulloutstream.hpp
index 562fb54..48e6952 100644
--- a/src/mlpack/core/util/nulloutstream.hpp
+++ b/src/mlpack/core/util/nulloutstream.hpp
@@ -32,54 +32,45 @@ class NullOutStream
    */
   NullOutStream(const NullOutStream& /* other */) { }
 
-  /*
-   We use (void) paramName in order to avoid the warning generated by
-   -Wextra. For some currently unknown reason, simply deleting the
-   parameter name (aka, outperator<<(bool) {...}) causes a compilation
-   error (with -Werror off) for only this class.
-   */
-
   //! Does nothing.
-  NullOutStream& operator<<(bool val) { (void) val; return *this; }
+  NullOutStream& operator<<(bool) { return *this; }
   //! Does nothing.
-  NullOutStream& operator<<(short val) { (void) val; return *this; }
+  NullOutStream& operator<<(short) { return *this; }
   //! Does nothing.
-  NullOutStream& operator<<(unsigned short val) { (void) val; return *this; }
+  NullOutStream& operator<<(unsigned short) { return *this; }
   //! Does nothing.
-  NullOutStream& operator<<(int val) { (void) val; return *this; }
+  NullOutStream& operator<<(int) { return *this; }
   //! Does nothing.
-  NullOutStream& operator<<(unsigned int val) { (void) val; return *this; }
+  NullOutStream& operator<<(unsigned int) { return *this; }
   //! Does nothing.
-  NullOutStream& operator<<(long val) { (void) val; return *this; }
+  NullOutStream& operator<<(long) { return *this; }
   //! Does nothing.
-  NullOutStream& operator<<(unsigned long val) { (void) val; return *this; }
+  NullOutStream& operator<<(unsigned long) { return *this; }
   //! Does nothing.
-  NullOutStream& operator<<(float val) { (void) val; return *this; }
+  NullOutStream& operator<<(float) { return *this; }
   //! Does nothing.
-  NullOutStream& operator<<(double val) { (void) val; return *this; }
+  NullOutStream& operator<<(double) { return *this; }
   //! Does nothing.
-  NullOutStream& operator<<(long double val) { (void) val; return *this; }
+  NullOutStream& operator<<(long double) { return *this; }
   //! Does nothing.
-  NullOutStream& operator<<(void* val) { (void) val; return *this; }
+  NullOutStream& operator<<(void*) { return *this; }
   //! Does nothing.
-  NullOutStream& operator<<(const char* str) { (void) str; return *this; }
+  NullOutStream& operator<<(const char*) { return *this; }
   //! Does nothing.
-  NullOutStream& operator<<(std::string& str) { (void) str; return *this; }
+  NullOutStream& operator<<(std::string&) { return *this; }
   //! Does nothing.
-  NullOutStream& operator<<(std::streambuf* sb) { (void) sb; return *this; }
+  NullOutStream& operator<<(std::streambuf*) { return *this; }
   //! Does nothing.
-  NullOutStream& operator<<(std::ostream& (*pf) (std::ostream&))
-  { (void) pf; return *this; }
+  NullOutStream& operator<<(std::ostream& (*) (std::ostream&)) { return *this; }
   //! Does nothing.
-  NullOutStream& operator<<(std::ios& (*pf) (std::ios&)) { (void) pf; return *this; }
+  NullOutStream& operator<<(std::ios& (*) (std::ios&)) { return *this; }
   //! Does nothing.
-  NullOutStream& operator<<(std::ios_base& (*pf) (std::ios_base&))
-  { (void) pf; return *this; }
+  NullOutStream& operator<<(std::ios_base& (*) (std::ios_base&))
+  { return *this; }
 
   //! Does nothing.
   template<typename T>
-  NullOutStream& operator<<(T& s)
-  { (void) s; return *this; }
+  NullOutStream& operator<<(T&) { return *this; }
 };
 
 } // namespace util



More information about the mlpack-git mailing list