all files / originalContracts/ Lib1.sol

42.86% Statements 3/7
0% Branches 0/2
50% Functions 1/2
57.14% Lines 4/7
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16                  10× 10× 10× 10×      
pragma solidity ^0.4.4;
library Lib1{
    function findAddress(address a, address[] storage arry) returns (int){
        for (uint i = 0 ; i < arry.length ; i++){
            if(arry[i] == a){return int(i);}
        }
        return -1;
    }
    function removeAddress(uint i, address[] storage arry){
        uint lengthMinusOne = arry.length - 1;
        arry[i] = arry[lengthMinusOne];
        delete arry[lengthMinusOne];
        arry.length = lengthMinusOne;
    }
}