Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 28, 2005, 6:49:58 PM (18 years ago)
Author:
patrick
Message:

network: made some functions and arguments const, since they musn't change any data.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/network/src/subprojects/network/simple_sync.cc

    r5805 r5806  
    6060 *  write data to Synchronizeable
    6161 */
    62 void SimpleSync::writeBytes(byte* data, int length)
     62void SimpleSync::writeBytes(const byte* data, int length)
    6363{
    6464  PRINTF(0)("SimpleSync: got %i bytes of data\n", length);
     
    8080 *  read data from Synchronizeable
    8181 */
    82 int SimpleSync::readBytes(byte* data)
     82int SimpleSync::readBytes(byte* data) const
    8383{
    8484  PRINTF(0)("SimpleSync: sent %i bytes of data\n", this->outLength);
    8585
     86  /* debug msg */
     87  this->readDebug();
     88
    8689  /* write the test message */
    8790  for( int i = 0; i < this->outLength; i++)
    88   {
    8991    data[i] = this->outData[i];
    90   }
    9192
    92   /* debug msg */
    93   this->readDebug();
    9493  /* return the length of the test */
    9594  return this->outLength;
     
    9796
    9897
    99 void SimpleSync::writeDebug()
     98void SimpleSync::writeDebug() const
    10099{
    101100  PRINTF(0)("Write in bytes: \t(0 <-) |");
     
    108107
    109108
    110 void SimpleSync::readDebug()
     109void SimpleSync::readDebug() const
    111110{
    112111  PRINTF(0)("Read out bytes: \t(0 ->) |");
Note: See TracChangeset for help on using the changeset viewer.