Add explicit to the string constructor

This prevents the automatic conversion from string to UUID
This commit is contained in:
Jelle 2021-11-29 15:49:07 +01:00 committed by GitHub
parent 5ca4dac8db
commit d2f5076f4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -127,7 +127,7 @@ class UUID {
}
/* Builds an UUID from a byte string (16 bytes long) */
UUID(const std::string &bytes) {
explicit UUID(const std::string &bytes) {
__m128i x = betole128(_mm_loadu_si128((__m128i*)bytes.data()));
_mm_store_si128((__m128i*)data, x);
}