From 43ebad282c894a29c7033776ebad43328a2f1f8d Mon Sep 17 00:00:00 2001 From: Dmitry Marakasov Date: Thu, 26 Nov 2015 14:23:03 +0300 Subject: [PATCH] Improve documentation --- SDL2pp/Point.hh | 14 +++++++++----- SDL2pp/Rect.hh | 14 +++++++++----- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/SDL2pp/Point.hh b/SDL2pp/Point.hh index 3b9c693..de188b6 100644 --- a/SDL2pp/Point.hh +++ b/SDL2pp/Point.hh @@ -475,15 +475,19 @@ std::ostream& operator<<(std::ostream& stream, const SDL2pp::Point& point); namespace std { //////////////////////////////////////////////////////////// -/// \brief Hash function for SDL2pp::Point -/// -/// \param[in] p Input Point -/// -/// \returns Hash value +/// \brief std::hash specialization for SDL2pp::Rect /// //////////////////////////////////////////////////////////// template<> struct hash { + //////////////////////////////////////////////////////////// + /// \brief Hash function for SDL2pp::Point + /// + /// \param[in] p Input Point + /// + /// \returns Hash value + /// + //////////////////////////////////////////////////////////// size_t operator()(const SDL2pp::Point& p) const { size_t seed = std::hash()(p.x); seed ^= std::hash()(p.y) + 0x9e3779b9 + (seed<<6) + (seed>>2); diff --git a/SDL2pp/Rect.hh b/SDL2pp/Rect.hh index 4efeb2d..81691a7 100644 --- a/SDL2pp/Rect.hh +++ b/SDL2pp/Rect.hh @@ -550,15 +550,19 @@ std::ostream& operator<<(std::ostream& stream, const SDL2pp::Rect& rect); namespace std { //////////////////////////////////////////////////////////// -/// \brief Hash function for SDL2pp::Rect -/// -/// \param[in] r Input Rect -/// -/// \returns Hash value +/// \brief std::hash specialization for SDL2pp::Rect /// //////////////////////////////////////////////////////////// template<> struct hash { + //////////////////////////////////////////////////////////// + /// \brief Hash function for SDL2pp::Rect + /// + /// \param[in] r Input Rect + /// + /// \returns Hash value + /// + //////////////////////////////////////////////////////////// size_t operator()(const SDL2pp::Rect& r) const { size_t seed = std::hash()(r.x); seed ^= std::hash()(r.y) + 0x9e3779b9 + (seed<<6) + (seed>>2);