Adjusts compilation tests to read-only array length.

This commit is contained in:
Erik Kundt 2019-09-18 15:36:09 +02:00
parent ecaed1030f
commit 5020e186da
4 changed files with 5 additions and 4 deletions

View File

@ -143,7 +143,7 @@ contract MultiSigWallet {
owners[i] = owners[owners.length - 1];
break;
}
owners.length -= 1;
owners.pop();
if (required > owners.length)
changeRequirement(owners.length);
emit OwnerRemoval(owner);

View File

@ -77,7 +77,7 @@ contract moduleHandler is multiOwner, announcementTypes {
require( success );
if ( ! found ) {
id = modules.length;
modules.length++;
modules.push();
}
modules[id] = input;
}

View File

@ -46,7 +46,8 @@ contract schellingDB is safeMath, schellingVars {
Constructor
*/
constructor() public {
rounds.length = 2;
rounds.push();
rounds.push();
rounds[0].blockHeight = block.number;
currentSchellingRound = 1;
}

View File

@ -227,7 +227,7 @@ contract MilestoneTracker {
RLP.RLPItem memory itmProposal = itrProposals.next();
Milestone storage milestone = milestones[milestones.length ++];
Milestone storage milestone = milestones.push();
if (!itmProposal.isList()) revert();