Skip to content

Commit a63a50a

Browse files
authored
Merge branch 'master' into fulldecent-patch-3
2 parents 1b5cdcb + a9bb47a commit a63a50a

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

src/contracts/tokens/nf-token-metadata.sol

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,7 @@ contract NFTokenMetadata is
9696
{
9797
super._burn(_tokenId);
9898

99-
if (bytes(idToUri[_tokenId]).length != 0)
100-
{
101-
delete idToUri[_tokenId];
102-
}
99+
delete idToUri[_tokenId];
103100
}
104101

105102
/**

src/contracts/tokens/nf-token.sol

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ contract NFToken is
373373
virtual
374374
{
375375
require(idToOwner[_tokenId] == _from, NOT_OWNER);
376-
ownerToNFTokenCount[_from] = ownerToNFTokenCount[_from] - 1;
376+
ownerToNFTokenCount[_from] -= 1;
377377
delete idToOwner[_tokenId];
378378
}
379379

@@ -393,7 +393,7 @@ contract NFToken is
393393
require(idToOwner[_tokenId] == address(0), NFT_ALREADY_EXISTS);
394394

395395
idToOwner[_tokenId] = _to;
396-
ownerToNFTokenCount[_to] = ownerToNFTokenCount[_to] + 1;
396+
ownerToNFTokenCount[_to] += 1;
397397
}
398398

399399
/**
@@ -452,10 +452,7 @@ contract NFToken is
452452
)
453453
private
454454
{
455-
if (idToApproval[_tokenId] != address(0))
456-
{
457-
delete idToApproval[_tokenId];
458-
}
455+
delete idToApproval[_tokenId];
459456
}
460457

461458
}

0 commit comments

Comments
 (0)