Logo Search packages:      
Sourcecode: einstein version File versions  Download package

size_t Buffer::putInteger ( int  value  ) 

Add integer to buffer and advance current position by 4. Grow buffer if needed.

Parameters:
value value to add.

Definition at line 71 of file buffer.cpp.

References putData().

Referenced by putUtf8().

{
    unsigned char b[4];
    int i, ib;

    for (i = 0; i < 4; i++) {
        ib = v & 0xFF;
        v = v >> 8;
        b[i] = ib;
    }

    return putData(b, 4);
}


Generated by  Doxygen 1.6.0   Back to index