=============== idMsgQueue::CopyToBuffer =============== */
| 143 | =============== |
| 144 | */ |
| 145 | void idMsgQueue::CopyToBuffer( byte *buf ) const { |
| 146 | if ( startIndex <= endIndex ) { |
| 147 | memcpy( buf, buffer + startIndex, endIndex - startIndex ); |
| 148 | } else { |
| 149 | memcpy( buf, buffer + startIndex, sizeof( buffer ) - startIndex ); |
| 150 | memcpy( buf + sizeof( buffer ) - startIndex, buffer, endIndex ); |
| 151 | } |
| 152 | } |
| 153 | |
| 154 | /* |
| 155 | =============== |