QRCoder
QRCoder copied to clipboard
Replace byte[] with color struct
Instead of the byte[] could we use a
public struct Color
{
public byte R;
public byte G;
public byte B;
public byte A;
}
to avoid the (temp.) allocation?
Or when the array-like semantics should be kept, an InlineArray (where supported) / a fixed sized buffer when not supported?
Could be done in a separate PR also. Maybe that would be event better, as such "helper types" can be created there, and with a pass over the code base more such occurances be changed.
Originally posted by @gfoidl in https://github.com/Shane32/QRCoder/pull/640#discussion_r2405629452