Consistently name multiple returned values (#5177)
Signed-off-by: Hadrien Croubois <hadrien.croubois@gmail.com>
This commit is contained in:
committed by
Hadrien Croubois
parent
22ec876c5a
commit
6c73fcddea
@ -71,8 +71,11 @@ library Time {
|
||||
* @dev Get the value at a given timepoint plus the pending value and effect timepoint if there is a scheduled
|
||||
* change after this timepoint. If the effect timepoint is 0, then the pending value should not be considered.
|
||||
*/
|
||||
function _getFullAt(Delay self, uint48 timepoint) private pure returns (uint32, uint32, uint48) {
|
||||
(uint32 valueBefore, uint32 valueAfter, uint48 effect) = self.unpack();
|
||||
function _getFullAt(
|
||||
Delay self,
|
||||
uint48 timepoint
|
||||
) private pure returns (uint32 valueBefore, uint32 valueAfter, uint48 effect) {
|
||||
(valueBefore, valueAfter, effect) = self.unpack();
|
||||
return effect <= timepoint ? (valueAfter, 0, 0) : (valueBefore, valueAfter, effect);
|
||||
}
|
||||
|
||||
@ -80,7 +83,7 @@ library Time {
|
||||
* @dev Get the current value plus the pending value and effect timepoint if there is a scheduled change. If the
|
||||
* effect timepoint is 0, then the pending value should not be considered.
|
||||
*/
|
||||
function getFull(Delay self) internal view returns (uint32, uint32, uint48) {
|
||||
function getFull(Delay self) internal view returns (uint32 valueBefore, uint32 valueAfter, uint48 effect) {
|
||||
return _getFullAt(self, timestamp());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user