From f030154fe727e25a2afe1f78b3998c2d2dba95e4 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Tue, 18 Aug 2009 09:24:15 +0000 Subject: astyle cleanup, corrects not loading of material textures --- src/core/cvar.h | 66 ++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 39 insertions(+), 27 deletions(-) (limited to 'src/core/cvar.h') diff --git a/src/core/cvar.h b/src/core/cvar.h index 4c3d942..3d7b246 100644 --- a/src/core/cvar.h +++ b/src/core/cvar.h @@ -28,34 +28,44 @@ public: * Game a cvar with this flag is only valid when a game is loaded * Info a cvar that updates player info */ - enum Flags {Archive=1, ReadOnly=2, Game=4, Info=8}; - + enum Flags {Archive = 1, ReadOnly = 2, Game = 4, Info = 8}; + /// create a new variable Cvar(const char* name, const unsigned int flags = 0); -/*----- inspectors ------------------------------------------------ */ + /*----- inspectors ------------------------------------------------ */ /// returns the name of the variable - inline const std::string& name() const { return cvar_name; } + inline const std::string& name() const { + return cvar_name; + } /// returns the info of the variable - inline const std::string& info() const { return cvar_info; } + inline const std::string& info() const { + return cvar_info; + } /// returns the flags of the variable - inline const unsigned int flags() const { return cvar_flags; } + inline const unsigned int flags() const { + return cvar_flags; + } /// returns the float value of the variable - inline const float value() const { return cvar_value; } + inline const float value() const { + return cvar_value; + } /// returns the string value of the variable - inline const std::string& str() const { return cvar_str; } + inline const std::string& str() const { + return cvar_str; + } -/*----- mutators -------------------------------------------------- */ + /*----- mutators -------------------------------------------------- */ /// set the info string void set_info(const char* info); - /// char * assignment operator + /// char * assignment operator Cvar &operator=(const char* other); /// std::string assignment operator @@ -64,40 +74,40 @@ public: /// float assignment operator Cvar &operator=(const float other); -/* ---- Static functions for the Cvar registry -------------------- */ + /* ---- Static functions for the Cvar registry -------------------- */ /// type definition for the Cvar registry typedef std::map Registry; - + /** * @brief get a cvar value from the registry * If the a cvar with the given name already exists in the registry, - * its value will not be changed. If the cvar does not exist, - * it will be created - */ - static Cvar* get(const char* name, const char* value, const unsigned int flags=0); + * its value will not be changed. If the cvar does not exist, + * it will be created + */ + static Cvar* get(const char* name, const char* value, const unsigned int flags = 0); /** * @brief get a cvar value from the registry * If the a cvar with the given name already exists in the registry, - * its value will not be changed. If the cvar does not exist, - * it will be created - */ - static Cvar* get(const char* name, const float value, const unsigned int flags=0); + * its value will not be changed. If the cvar does not exist, + * it will be created + */ + static Cvar* get(const char* name, const float value, const unsigned int flags = 0); /** * @brief set a cvar value * If the a cvar with the given name already exists in the registry, - * its value will be replaced - */ - static Cvar* set(const char* name, const char* value, const unsigned int flags=0); + * its value will be replaced + */ + static Cvar* set(const char* name, const char* value, const unsigned int flags = 0); /** * @brief set a cvar value * If the a cvar with the given name already exists in the registry, - * its value will be replaced - */ - static Cvar* set(const char* name, float value, const unsigned int flags=0); + * its value will be replaced + */ + static Cvar* set(const char* name, float value, const unsigned int flags = 0); /// search for a named cvar, returns 0 if not found static Cvar* find(const std::string& name); @@ -115,7 +125,9 @@ public: static void list(); /// the cvar registry - static inline Registry & registry() { return cvar_registry; } + static inline Registry & registry() { + return cvar_registry; + } static Cvar *sv_dedicated; // dedicated server static Cvar *sv_private; // client with private server -- cgit v1.2.3