From e36d1044ebf169e878d268f454132745092814b1 Mon Sep 17 00:00:00 2001 From: minaminao Date: Tue, 25 Jul 2023 02:09:42 +0900 Subject: [PATCH] fix: shadowing warning --- src/strings.sol | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/strings.sol b/src/strings.sol index f7ae13a8..c801990e 100644 --- a/src/strings.sol +++ b/src/strings.sol @@ -42,9 +42,9 @@ library strings { uint _ptr; } - function memcpy(uint dest, uint src, uint len) private pure { + function memcpy(uint dest, uint src, uint length) private pure { // Copy word-length chunks while possible - for(; len >= 32; len -= 32) { + for(; length >= 32; length -= 32) { assembly { mstore(dest, mload(src)) } @@ -54,8 +54,8 @@ library strings { // Copy remaining bytes uint mask = type(uint).max; - if (len > 0) { - mask = 256 ** (32 - len) - 1; + if (length > 0) { + mask = 256 ** (32 - length) - 1; } assembly { let srcpart := and(mload(src), not(mask))