From 8ed34d22fb45b6d0c07d6476addc78d7ec8e1e5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Leclercq?= Date: Tue, 8 Nov 2016 16:14:56 +0100 Subject: [PATCH] Core/ByteArray: Move ToHex implementation to .cpp --- include/Nazara/Core/ByteArray.hpp | 2 +- include/Nazara/Core/ByteArray.inl | 16 ---------------- src/Nazara/Core/ByteArray.cpp | 16 ++++++++++++++++ 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/include/Nazara/Core/ByteArray.hpp b/include/Nazara/Core/ByteArray.hpp index 90f9c5d03..4bdc34150 100644 --- a/include/Nazara/Core/ByteArray.hpp +++ b/include/Nazara/Core/ByteArray.hpp @@ -88,7 +88,7 @@ namespace Nz inline void ShrinkToFit(); inline void Swap(ByteArray& other); - inline String ToHex() const; + String ToHex() const; inline String ToString() const; // STL interface diff --git a/include/Nazara/Core/ByteArray.inl b/include/Nazara/Core/ByteArray.inl index 068bee4b6..b5d8b1510 100644 --- a/include/Nazara/Core/ByteArray.inl +++ b/include/Nazara/Core/ByteArray.inl @@ -465,22 +465,6 @@ namespace Nz m_array.swap(other.m_array); } - /*! - * \brief Gives a string representation in base 16 - * \return String in base 16 - */ - - inline String ByteArray::ToHex() const - { - std::size_t length = m_array.size() * 2; - - String hexOutput(length, '\0'); - for (std::size_t i = 0; i < m_array.size(); ++i) - std::sprintf(&hexOutput[i * 2], "%02x", m_array[i]); - - return hexOutput; - } - /*! * \brief Gives a string representation * \return String where each byte is converted to char diff --git a/src/Nazara/Core/ByteArray.cpp b/src/Nazara/Core/ByteArray.cpp index e505f13f2..592170e40 100644 --- a/src/Nazara/Core/ByteArray.cpp +++ b/src/Nazara/Core/ByteArray.cpp @@ -15,6 +15,22 @@ namespace Nz * \brief Core class that represents an array of bytes */ + /*! + * \brief Gives a string representation in base 16 + * \return String in base 16 + */ + + String ByteArray::ToHex() const + { + std::size_t length = m_array.size() * 2; + + String hexOutput(length, '\0'); + for (std::size_t i = 0; i < m_array.size(); ++i) + std::sprintf(&hexOutput[i * 2], "%02x", m_array[i]); + + return hexOutput; + } + /*! * \brief Output operator * \return The stream