You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Where all 5 parameters are required. So far, 9 times out of 10 I"m copying one entire buffer to another entire buffer, so I"m wondering, could we make destinationOffset default to 0 and size default to min(sourceBuffer.size - sourceOffset, destinationBuffer.size - destinationOffset)?
I think I agree sourceBuffer.sze - sourceOffset is better
Without min
copy(bigSrcBuffer, 0, smallDestBuffer)
fails which tells you smallDestBuffer was too small to take the entire src buffer which is probably a good error? Of course you wouldn"t get an error copying smallSrc->bigDst
copyBufferToBuffer
currently has this signature:Where all 5 parameters are required. So far, 9 times out of 10 I"m copying one entire buffer to another entire buffer, so I"m wondering, could we make
destinationOffset
default to 0 andsize
default tomin(sourceBuffer.size - sourceOffset, destinationBuffer.size - destinationOffset)
?Then I could just do
vs what I have to do now
It"s really only a minor inconvenience so not a big deal but I thought I"d ask anyway.
writeBuffer
has defaults for offset and size.The text was updated successfully, but these errors were encountered: