Skip to content

Commit cfb0b3b

Browse files
committed
Use inout in mir.format_impl.printHexAddressGen to reduce potential template bloat
1 parent 985b572 commit cfb0b3b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

source/mir/format_impl.d

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,9 @@ size_t printHexAddress(ulong c, ref dchar[16] buf, bool upper) { return printHex
213213
static if (is(ucent))
214214
size_t printHexAddress(ucent c, ref dchar[32] buf, bool upper) { return printHexAddressGen!(ucent, dchar)(c, buf, upper); }
215215

216-
size_t printHexAddressGen(T, C)(T c, ref C[T.sizeof * 2] buf, bool upper)
216+
size_t printHexAddressGen(T, C)(inout(T) c_, ref C[T.sizeof * 2] buf, bool upper)
217217
{
218+
T c = c_; // strip off inout
218219
static if (T.sizeof == 16)
219220
{
220221
printHexAddress(cast(ulong)(c >> 64), buf[0 .. 16], upper);

0 commit comments

Comments
 (0)