Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 19, 2015, 11:40:28 AM (9 years ago)
Author:
muemart
Message:

Run clang-modernize -add-override
A few notes:

  • There are probably some overrides missing, especially in funky templatey code
  • Virtual methods with wrong signatures were not fixed, needs to be done by hand (only warnings get emitted)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v2/src/libraries/network/Server.h

    r10622 r10817  
    6161    void open();
    6262    void close();
    63     void queuePacket(ENetPacket *packet, int clientID, uint8_t channelID);
    64     virtual bool sendPacket( packet::Packet* packet ){ return packet->send( static_cast<Host*>(this) ); }
     63    void queuePacket(ENetPacket *packet, int clientID, uint8_t channelID) override;
     64    virtual bool sendPacket( packet::Packet* packet ) override{ return packet->send( static_cast<Host*>(this) ); }
    6565    void update(const Clock& time);
    6666    unsigned int getRTT(unsigned int clientID);
    67     virtual void printRTT();
     67    virtual void printRTT() override;
    6868    float getPacketLoss(unsigned int clientID);
    6969    int getClientCount() { return this->clientIDs_.size();}
     
    7373    void updateGamestate();
    7474  private:
    75     virtual bool isServer_(){return true;}
     75    virtual bool isServer_() override{return true;}
    7676    unsigned int playerID(){return 0;}
    7777
    78     void addPeer(uint32_t peerID);
    79     void removePeer(uint32_t peerID);
    80     void processPacket(packet::Packet* packet);
     78    void addPeer(uint32_t peerID) override;
     79    void removePeer(uint32_t peerID) override;
     80    void processPacket(packet::Packet* packet) override;
    8181
    8282    bool createClient(int clientID);
     
    8585    bool sendObjectDeletes();
    8686    bool isValidTarget(unsigned int targetID);
    87     virtual void doSendChat(const std::string& message, unsigned int sourceID, unsigned int targetID);
    88     virtual void doReceiveChat(const std::string& message, unsigned int sourceID, unsigned int targetID);
     87    virtual void doSendChat(const std::string& message, unsigned int sourceID, unsigned int targetID) override;
     88    virtual void doReceiveChat(const std::string& message, unsigned int sourceID, unsigned int targetID) override;
    8989    void syncClassid(unsigned int clientID);
    9090
Note: See TracChangeset for help on using the changeset viewer.