Changeset 10994 for code/branches/cpp11_v2/src/libraries
- Timestamp:
- Dec 29, 2015, 5:36:14 PM (9 years ago)
- Location:
- code/branches/cpp11_v2/src/libraries
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/src/libraries/core/CorePrereqs.h
r10624 r10994 68 68 namespace orxonox 69 69 { 70 static const uint32_t OBJECTID_UNKNOWN = static_cast<uint32_t>(-1);70 static constexpr uint32_t OBJECTID_UNKNOWN = static_cast<uint32_t>(-1); 71 71 } 72 72 … … 82 82 83 83 //!A list of available scopes for the Scope template. 84 static const Value ROOT = 1;85 static const Value GRAPHICS = 2;84 static constexpr Value ROOT = 1; 85 static constexpr Value GRAPHICS = 2; 86 86 } 87 87 … … 90 90 typedef int Type; 91 91 92 static const Type STATIC_INITIALIZATION_HANDLER = 1;93 static const Type IDENTIFIER = 2;94 static const Type SCOPED_SINGLETON_WRAPPER = 3;95 static const Type COMMAND_LINE_ARGUMENT = 4;96 static const Type CONSOLE_COMMAND = 5;92 static constexpr Type STATIC_INITIALIZATION_HANDLER = 1; 93 static constexpr Type IDENTIFIER = 2; 94 static constexpr Type SCOPED_SINGLETON_WRAPPER = 3; 95 static constexpr Type COMMAND_LINE_ARGUMENT = 4; 96 static constexpr Type CONSOLE_COMMAND = 5; 97 97 } 98 98 -
code/branches/cpp11_v2/src/libraries/core/command/CommandExecutor.h
r10992 r10994 118 118 static CommandEvaluation evaluate(const std::string& command); 119 119 120 static const int Success = 0; ///< Error code for "success" (or no error)121 static const int Inexistent = 1; ///< Error code if the command doesn't exist122 static const int Incomplete = 2; ///< Error code if the command needs more arguments123 static const int Deactivated = 3; ///< Error code if the command is not active124 static const int Denied = 4; ///< Error code if the command needs a different access level125 static const int Error = 5; ///< Error code if the command returned an error120 static constexpr int Success = 0; ///< Error code for "success" (or no error) 121 static constexpr int Inexistent = 1; ///< Error code if the command doesn't exist 122 static constexpr int Incomplete = 2; ///< Error code if the command needs more arguments 123 static constexpr int Deactivated = 3; ///< Error code if the command is not active 124 static constexpr int Denied = 4; ///< Error code if the command needs a different access level 125 static constexpr int Error = 5; ///< Error code if the command returned an error 126 126 127 127 static std::string getErrorDescription(int error); -
code/branches/cpp11_v2/src/libraries/core/command/IRC.cc
r10768 r10994 44 44 namespace orxonox 45 45 { 46 static const unsigned int IRC_TCL_THREADID = 1421421421; ///< The ID of the thread in TclThreadManager that is used for the IRC connection46 static constexpr unsigned int IRC_TCL_THREADID = 1421421421; ///< The ID of the thread in TclThreadManager that is used for the IRC connection 47 47 48 48 SetConsoleCommand("IRC", "say", &IRC::say); -
code/branches/cpp11_v2/src/libraries/core/input/InputPrereqs.h
r8729 r10994 454 454 OrxEnumConstructors(InputStatePriority); 455 455 456 static const int Empty = -1;457 static const int Dynamic = 0;458 459 static const int HighPriority = 1000;460 static const int Console = HighPriority + 0;461 static const int Calibrator = HighPriority + 1;462 static const int Detector = HighPriority + 2;456 static constexpr int Empty = -1; 457 static constexpr int Dynamic = 0; 458 459 static constexpr int HighPriority = 1000; 460 static constexpr int Console = HighPriority + 0; 461 static constexpr int Calibrator = HighPriority + 1; 462 static constexpr int Detector = HighPriority + 2; 463 463 }; 464 464 } -
code/branches/cpp11_v2/src/libraries/network/NetworkFunction.h
r10845 r10994 45 45 46 46 #if defined(ORXONOX_COMPILER_GCC) && defined(ORXONOX_ARCH_32) 47 static const unsigned int MAX_FUNCTION_POINTER_SIZE = 8;47 static constexpr unsigned int MAX_FUNCTION_POINTER_SIZE = 8; 48 48 #else 49 static const unsigned int MAX_FUNCTION_POINTER_SIZE = 16;49 static constexpr unsigned int MAX_FUNCTION_POINTER_SIZE = 16; 50 50 #endif //ORXONOX_COMPILER_GCC 51 static const unsigned int MAX_FUNCTION_POINTER_INTS = (MAX_FUNCTION_POINTER_SIZE-1)/4+1;51 static constexpr unsigned int MAX_FUNCTION_POINTER_INTS = (MAX_FUNCTION_POINTER_SIZE-1)/4+1; 52 52 53 53 struct _NetworkExport NetworkFunctionPointer { -
code/branches/cpp11_v2/src/libraries/network/NetworkPrereqs.h
r10624 r10994 67 67 namespace orxonox 68 68 { 69 static const unsigned int GAMESTATEID_INITIAL = static_cast<unsigned int>(-1);69 static constexpr unsigned int GAMESTATEID_INITIAL = static_cast<unsigned int>(-1); 70 70 extern const char* LAN_DISCOVERY_MESSAGE; 71 71 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; 79 79 } 80 80 -
code/branches/cpp11_v2/src/libraries/network/TrafficControl.cc
r10775 r10994 38 38 namespace orxonox { 39 39 40 static const unsigned int SCHED_PRIORITY_OFFSET = static_cast<unsigned int>(-1);40 static constexpr unsigned int SCHED_PRIORITY_OFFSET = static_cast<unsigned int>(-1); 41 41 namespace arg = std::placeholders; 42 42 -
code/branches/cpp11_v2/src/libraries/network/packet/Gamestate.h
r10817 r10994 48 48 { 49 49 50 static const uint8_t GAMESTATE_MODE_SERVER = 0x1;51 static const uint8_t GAMESTATE_MODE_CLIENT = 0x2;50 static constexpr uint8_t GAMESTATE_MODE_SERVER = 0x1; 51 static constexpr uint8_t GAMESTATE_MODE_CLIENT = 0x2; 52 52 53 53 class _NetworkExport GamestateHeader -
code/branches/cpp11_v2/src/libraries/util/output/LogWriter.cc
r10989 r10994 44 44 namespace orxonox 45 45 { 46 static const int MAX_ARCHIVED_FILES = 9;46 static constexpr int MAX_ARCHIVED_FILES = 9; 47 47 48 48 /** -
code/branches/cpp11_v2/src/libraries/util/output/OutputDefinitions.h
r10624 r10994 132 132 namespace context 133 133 { 134 static const OutputContextMask all = 0xFFFFFFFFFFFFFFFFull; ///< Context mask, all bits set to 1135 static const OutputContextMask none = 0x0000000000000000ull; ///< Context mask, all bits set to 0134 static constexpr OutputContextMask all = 0xFFFFFFFFFFFFFFFFull; ///< Context mask, all bits set to 1 135 static constexpr OutputContextMask none = 0x0000000000000000ull; ///< Context mask, all bits set to 0 136 136 137 static const OutputContextSubID no_subcontext = 0; ///< Used as ID for contexts which are not sub-contexts137 static constexpr OutputContextSubID no_subcontext = 0; ///< Used as ID for contexts which are not sub-contexts 138 138 139 139 namespace
Note: See TracChangeset
for help on using the changeset viewer.