more 32bit stuff
This commit is contained in:
parent
c3c2d0f133
commit
fd094b157f
@ -108,7 +108,7 @@ namespace Components {
|
||||
struct Peer {
|
||||
struct Entry {
|
||||
float time_point {0.f};
|
||||
size_t bytes {0u};
|
||||
uint64_t bytes {0u};
|
||||
bool accounted {false};
|
||||
};
|
||||
std::deque<Entry> recently_sent;
|
||||
|
@ -25,16 +25,16 @@ std::ostream& operator<<(std::ostream& out, const SHA1Digest& v);
|
||||
|
||||
namespace std { // inject
|
||||
template<> struct hash<SHA1Digest> {
|
||||
std::size_t operator()(const SHA1Digest& h) const noexcept {
|
||||
std::uint64_t operator()(const SHA1Digest& h) const noexcept {
|
||||
return
|
||||
size_t(h.data[0]) << (0*8) |
|
||||
size_t(h.data[1]) << (1*8) |
|
||||
size_t(h.data[2]) << (2*8) |
|
||||
size_t(h.data[3]) << (3*8) |
|
||||
size_t(h.data[4]) << (4*8) |
|
||||
size_t(h.data[5]) << (5*8) |
|
||||
size_t(h.data[6]) << (6*8) |
|
||||
size_t(h.data[7]) << (7*8)
|
||||
std::uint64_t(h.data[0]) << (0*8) |
|
||||
std::uint64_t(h.data[1]) << (1*8) |
|
||||
std::uint64_t(h.data[2]) << (2*8) |
|
||||
std::uint64_t(h.data[3]) << (3*8) |
|
||||
std::uint64_t(h.data[4]) << (4*8) |
|
||||
std::uint64_t(h.data[5]) << (5*8) |
|
||||
std::uint64_t(h.data[6]) << (6*8) |
|
||||
std::uint64_t(h.data[7]) << (7*8)
|
||||
;
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user