Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 19, 2010, 5:48:01 PM (14 years ago)
Author:
landauf
Message:

removed unnecessary return values from console commands "log", "error", "warning", "info", and "debug"
removed return value from console command Chat (the non-static chat functions still return a bool)
config and tconfig don't return a bool anymore but instead print an error if the config value doesn't exist.

fixed console command "printRTT" - it shouldn't crash on a standalone system.

Location:
code/branches/consolecommands3/src/libraries/network
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/consolecommands3/src/libraries/network/ClientConnection.cc

    r6417 r7190  
    149149  uint32_t ClientConnection::getRTT()
    150150  {
    151     assert(server_);
    152     return server_->roundTripTime;
     151    if (server_)
     152        return server_->roundTripTime;
     153    else
     154        return 0;
    153155  }
    154156
  • code/branches/consolecommands3/src/libraries/network/Host.cc

    r7163 r7190  
    8989  }
    9090
    91   bool Host::Chat(const std::string& message)
     91  void Host::Chat(const std::string& message)
    9292  {
    9393    if(instances_s.size()==0)
     
    9595      for (ObjectList<ChatListener>::iterator it = ObjectList<ChatListener>::begin(); it != ObjectList<ChatListener>::end(); ++it)
    9696        it->incomingChat(message, 0);
    97       return true;
     97//      return true;
    9898    }
    9999    else
     
    108108        }
    109109      }
    110       return result;
     110//      return result;
    111111    }
    112112  }
     
    139139    for (ObjectList<ChatListener>::iterator it = ObjectList<ChatListener>::begin(); it != ObjectList<ChatListener>::end(); ++it)
    140140      it->incomingChat(message, playerID);
    141    
     141
    142142    bool result = true;
    143143    for( std::vector<Host*>::iterator it = instances_s.begin(); it!=instances_s.end(); ++it )
  • code/branches/consolecommands3/src/libraries/network/Host.h

    r7163 r7190  
    7979    static void setShipID(unsigned int id){ shipID_s = id; }
    8080    static bool isServer();
    81     static bool Chat(const std::string& message);
     81    static void Chat(const std::string& message);
    8282    static bool Broadcast(const std::string& message);
    8383    static bool incomingChat(const std::string& message, unsigned int playerID);
Note: See TracChangeset for help on using the changeset viewer.