made conversion explicit

This commit is contained in:
Pagwin 2024-12-11 20:31:49 -05:00
parent af6503d2bb
commit 8031f464fc
No known key found for this signature in database
GPG key ID: 81137023740CA260

View file

@ -283,7 +283,7 @@ public:
return lhs; return lhs;
} }
operator unsigned long() { explicit operator unsigned long() {
unsigned long ret = 0; unsigned long ret = 0;
for (std::size_t i = 0; i < std::min(size, sizeof(unsigned long)); i++) { for (std::size_t i = 0; i < std::min(size, sizeof(unsigned long)); i++) {
ret += (static_cast<unsigned long>(this->bytes[i]) << (i * 8)); ret += (static_cast<unsigned long>(this->bytes[i]) << (i * 8));