From 4c58fc2efac7170b760629b5f6b0689370a52b19 Mon Sep 17 00:00:00 2001 From: Beman Date: Fri, 29 Aug 2014 08:12:16 -0400 Subject: [PATCH] Clear [-Wunused-parameter] warnings (Roger Leigh) --- include/boost/endian/conversion.hpp | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/include/boost/endian/conversion.hpp b/include/boost/endian/conversion.hpp index 8855a29..b9f01a1 100644 --- a/include/boost/endian/conversion.hpp +++ b/include/boost/endian/conversion.hpp @@ -384,24 +384,22 @@ namespace endian inline void reverse(Value& x) BOOST_NOEXCEPT {x = reverse_value(x);} // reverse unless native endianness is big - template - inline void big_endian(Reversible& x) BOOST_NOEXCEPT - // Effects: none if native endian order is big, otherwise reverse(x) - { -# ifndef BOOST_BIG_ENDIAN - reverse(x); + // Effects: none if native endian order is big, otherwise reverse(x) + template +# ifdef BOOST_BIG_ENDIAN + inline void big_endian(Reversible&) BOOST_NOEXCEPT {} +# else + inline void big_endian(Reversible& x) BOOST_NOEXCEPT {reverse(x);} # endif - } // reverse bytes unless native endianness is little + // Effects: none if native endian order is little, otherwise reverse(x) template - inline void little_endian(Reversible& x) BOOST_NOEXCEPT - // Effects: none if native endian order is little, otherwise reverse(x) - { -# ifndef BOOST_LITTLE_ENDIAN - reverse(x); +# ifdef BOOST_LITTLE_ENDIAN + inline void little_endian(Reversible&) BOOST_NOEXCEPT {} +# else + inline void little_endian(Reversible& x) BOOST_NOEXCEPT {reverse(x);} # endif - } namespace detail {