0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-31 18:04:06 +01:00

ircd::b64: Simplify padded length conditionals.

This commit is contained in:
Jason Volk 2020-08-21 09:43:15 -07:00
parent 3e2aff3a71
commit 7c583061f3

View file

@ -180,8 +180,8 @@ noexcept
size(encoded)
};
len += copy(out + len, _pad[0]) & pads & 1;
len += copy(out + len, _pad[1]) & (pads >> 1) & 1;
len += copy(out + len, _pad[0]) & (pads > 0);
len += copy(out + len, _pad[1]) & (pads > 1);
return string_view
{
data(out), len