Electroneum
Loading...
Searching...
No Matches
std::hash< cryptonote::subaddress_index > Struct Reference

#include <subaddress_index.h>

Public Member Functions

size_t operator() (const cryptonote::subaddress_index &index) const

Detailed Description

Definition at line 68 of file subaddress_index.h.

Member Function Documentation

◆ operator()()

size_t std::hash< cryptonote::subaddress_index >::operator() ( const cryptonote::subaddress_index & index) const
inline

Definition at line 70 of file subaddress_index.h.

71 {
72 size_t res;
73 if (sizeof(size_t) == 8)
74 {
75 res = ((uint64_t)index.major << 32) | index.minor;
76 }
77 else
78 {
79 // https://stackoverflow.com/a/17017281
80 res = 17;
81 res = res * 31 + hash<uint32_t>()(index.major);
82 res = res * 31 + hash<uint32_t>()(index.minor);
83 }
84 return res;
85 }
const char * res
unsigned __int64 uint64_t
Definition stdint.h:136

The documentation for this struct was generated from the following file:
  • /home/abuild/rpmbuild/BUILD/electroneum-5.1.3.1-build/electroneum-5.1.3.1/src/cryptonote_basic/subaddress_index.h