Pots to midi with hairless

It doesn't change nothing... The code should be modified to accept at least 2 analog in ...
But I don't understand how to do it

PS:

 for(int i=0; i<HISTORY_BUFFER_LENGTH; i++)//in +
    {//in +
        if(s_history[i] == nMappedValue)//in +
            return;//in +
    }//in +

    memcpy(&s_history[0], &s_history[1], sizeof(int) * (HISTORY_BUFFER_LENGTH - 1));//in +
    s_history[HISTORY_BUFFER_LENGTH - 1] = nMappedValue;//in +

Someone can explain me this part of code? if I want to create a second history for analog 2.. how should I do it?