Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 17, 2016, 10:29:21 PM (8 years ago)
Author:
landauf
Message:

merged branch cpp11_v3 back to trunk

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/libraries/network/NetworkPrereqs.h

    r10624 r11071  
    6767namespace orxonox
    6868{
    69   static const unsigned int GAMESTATEID_INITIAL       = static_cast<unsigned int>(-1);
     69  static constexpr unsigned int GAMESTATEID_INITIAL       = static_cast<unsigned int>(-1);
    7070  extern const char* LAN_DISCOVERY_MESSAGE;
    7171  extern const char* LAN_DISCOVERY_ACK;
    72   static const unsigned int LAN_DISCOVERY_PORT          = 55558;
    73   static const unsigned int NETWORK_PEER_ID_SERVER      = 0;
    74   static const unsigned int NETWORK_PEER_ID_BROADCAST   = static_cast<unsigned int>(-1);
    75   static const unsigned int NETWORK_PEER_ID_UNKNOWN     = static_cast<unsigned int>(-2);
    76   static const unsigned int NETWORK_CHANNEL_DEFAULT     = 0;
    77   static const unsigned int NETWORK_CHANNEL_UNRELIABLE  = 1;
    78   static const unsigned int NETWORK_CHANNEL_COUNT       = 2;
     72  static constexpr unsigned int LAN_DISCOVERY_PORT          = 55558;
     73  static constexpr unsigned int NETWORK_PEER_ID_SERVER      = 0;
     74  static constexpr unsigned int NETWORK_PEER_ID_BROADCAST   = static_cast<unsigned int>(-1);
     75  static constexpr unsigned int NETWORK_PEER_ID_UNKNOWN     = static_cast<unsigned int>(-2);
     76  static constexpr unsigned int NETWORK_CHANNEL_DEFAULT     = 0;
     77  static constexpr unsigned int NETWORK_CHANNEL_UNRELIABLE  = 1;
     78  static constexpr unsigned int NETWORK_CHANNEL_COUNT       = 2;
    7979}
    8080
     
    8989    namespace PacketFlag
    9090    {
    91       enum Value
    92       {
    93         Reliable    = 1,
    94         Unsequenced = 2,
    95         NoAllocate  = 4
    96       };
     91      static constexpr uint32_t Reliable    = 1;
     92      static constexpr uint32_t Unsequenced = 2;
     93      static constexpr uint32_t NoAllocate  = 4;
    9794    }
    9895  }
     
    10198  {
    10299    typedef int Type;
    103     static const Type NETWORK_FUNCTION = 6;
     100    static constexpr Type NETWORK_FUNCTION = 6;
    104101  }
    105102}
Note: See TracChangeset for help on using the changeset viewer.