mirror of
https://github.com/libSDL2pp/libSDL2pp.git
synced 2025-09-07 14:25:17 -04:00
Improve documentation
This commit is contained in:
parent
fa3cb7bcd9
commit
43ebad282c
@ -474,6 +474,12 @@ std::ostream& operator<<(std::ostream& stream, const SDL2pp::Point& point);
|
||||
|
||||
namespace std {
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief std::hash specialization for SDL2pp::Rect
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
template<>
|
||||
struct hash<SDL2pp::Point> {
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Hash function for SDL2pp::Point
|
||||
///
|
||||
@ -482,8 +488,6 @@ namespace std {
|
||||
/// \returns Hash value
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
template<>
|
||||
struct hash<SDL2pp::Point> {
|
||||
size_t operator()(const SDL2pp::Point& p) const {
|
||||
size_t seed = std::hash<int>()(p.x);
|
||||
seed ^= std::hash<int>()(p.y) + 0x9e3779b9 + (seed<<6) + (seed>>2);
|
||||
|
@ -549,6 +549,12 @@ std::ostream& operator<<(std::ostream& stream, const SDL2pp::Rect& rect);
|
||||
|
||||
namespace std {
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief std::hash specialization for SDL2pp::Rect
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
template<>
|
||||
struct hash<SDL2pp::Rect> {
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Hash function for SDL2pp::Rect
|
||||
///
|
||||
@ -557,8 +563,6 @@ namespace std {
|
||||
/// \returns Hash value
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
template<>
|
||||
struct hash<SDL2pp::Rect> {
|
||||
size_t operator()(const SDL2pp::Rect& r) const {
|
||||
size_t seed = std::hash<int>()(r.x);
|
||||
seed ^= std::hash<int>()(r.y) + 0x9e3779b9 + (seed<<6) + (seed>>2);
|
||||
|
Loading…
x
Reference in New Issue
Block a user