mirror of
https://github.com/lens-protocol/core.git
synced 2026-01-14 08:28:03 -05:00
refactor: Optimized post-increments to use pre-increments where possible.
This commit is contained in:
@@ -886,7 +886,7 @@ contract LensHub is ILensHub, LensNFTBase, VersionedInitializable, LensMultiStat
|
||||
_collectModuleWhitelisted,
|
||||
_referenceModuleWhitelisted
|
||||
);
|
||||
_profileById[vars.profileId].pubCount++;
|
||||
++_profileById[vars.profileId].pubCount;
|
||||
}
|
||||
|
||||
function _createMirror(
|
||||
|
||||
@@ -109,7 +109,7 @@ contract LimitedFeeCollectModule is ICollectModule, FeeModuleBase, FollowValidat
|
||||
) {
|
||||
revert Errors.MintLimitExceeded();
|
||||
} else {
|
||||
_dataByPublicationByProfile[profileId][pubId].currentCollects++;
|
||||
++_dataByPublicationByProfile[profileId][pubId].currentCollects;
|
||||
if (referrerProfileId == profileId) {
|
||||
_processCollect(collector, profileId, pubId, data);
|
||||
} else {
|
||||
|
||||
@@ -120,7 +120,7 @@ contract LimitedTimedFeeCollectModule is ICollectModule, FeeModuleBase, FollowVa
|
||||
) {
|
||||
revert Errors.MintLimitExceeded();
|
||||
} else {
|
||||
_dataByPublicationByProfile[profileId][pubId].currentCollects++;
|
||||
++_dataByPublicationByProfile[profileId][pubId].currentCollects;
|
||||
if (referrerProfileId == profileId) {
|
||||
_processCollect(collector, profileId, pubId, data);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user