refactor: Optimized post-increments to use pre-increments where possible.

This commit is contained in:
Peter Michael
2022-03-23 18:46:13 -04:00
parent 42dd95f3eb
commit 56d6b2830f
3 changed files with 3 additions and 3 deletions

View File

@@ -886,7 +886,7 @@ contract LensHub is ILensHub, LensNFTBase, VersionedInitializable, LensMultiStat
_collectModuleWhitelisted,
_referenceModuleWhitelisted
);
_profileById[vars.profileId].pubCount++;
++_profileById[vars.profileId].pubCount;
}
function _createMirror(

View File

@@ -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 {

View File

@@ -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 {