diff options
Diffstat (limited to 'ArrayUtils.h')
-rw-r--r-- | ArrayUtils.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ArrayUtils.h b/ArrayUtils.h index 73e88340..31cca817 100644 --- a/ArrayUtils.h +++ b/ArrayUtils.h @@ -60,10 +60,11 @@ public: /// Stack pre: end_ref start_ref /// Stack post: end_ref void clearStorageLoop(Type const& _type) const; - /// Converts length to size (multiplies by size on stack), rounds up for byte arrays. + /// Converts length to size (number of storage slots or calldata/memory bytes). + /// if @a _pad then add padding to multiples of 32 bytes for calldata/memory. /// Stack pre: length /// Stack post: size - void convertLengthToSize(ArrayType const& _arrayType) const; + void convertLengthToSize(ArrayType const& _arrayType, bool _pad = false) const; /// Retrieves the length (number of elements) of the array ref on the stack. This also /// works for statically-sized arrays. /// Stack pre: reference |