small fixes

This commit is contained in:
Ricardo Guilherme Schmidt 2018-05-08 20:17:00 -03:00
parent 72dffc3a47
commit 04e13c6913
1 changed files with 9 additions and 9 deletions

View File

@ -354,8 +354,7 @@ contract MiniMeToken is MiniMeTokenInterface, Controlled {
// requires that the `parentToken.balanceOfAt` be queried at the
// genesis block for that token as this contains initial balance of
// this token
if ((balances[_owner].length == 0)
|| (balances[_owner][0].fromBlock > _blockNumber)) {
if ((balances[_owner].length == 0) || (balances[_owner][0].fromBlock > _blockNumber)) {
if (address(parentToken) != 0) {
return parentToken.balanceOfAt(_owner, min(_blockNumber, parentSnapShotBlock));
} else {
@ -381,8 +380,7 @@ contract MiniMeToken is MiniMeTokenInterface, Controlled {
// requires that the `parentToken.totalSupplyAt` be queried at the
// genesis block for this token as that contains totalSupply of this
// token at this block number.
if ((totalSupplyHistory.length == 0)
|| (totalSupplyHistory[0].fromBlock > _blockNumber)) {
if ((totalSupplyHistory.length == 0) || (totalSupplyHistory[0].fromBlock > _blockNumber)) {
if (address(parentToken) != 0) {
return parentToken.totalSupplyAt(min(_blockNumber, parentSnapShotBlock));
} else {
@ -519,7 +517,7 @@ contract MiniMeToken is MiniMeTokenInterface, Controlled {
Checkpoint[] storage checkpoints,
uint _block
)
constant
view
internal
returns (uint)
{
@ -556,8 +554,10 @@ contract MiniMeToken is MiniMeTokenInterface, Controlled {
* @param _value The new number of tokens
*/
function updateValueAtNow(Checkpoint[] storage checkpoints, uint _value) internal {
if ((checkpoints.length == 0)
|| (checkpoints[checkpoints.length -1].fromBlock < block.number)) {
if (
(checkpoints.length == 0) ||
(checkpoints[checkpoints.length - 1].fromBlock < block.number))
{
Checkpoint storage newCheckPoint = checkpoints[checkpoints.length++];
newCheckPoint.fromBlock = uint128(block.number);
newCheckPoint.value = uint128(_value);