diff --git a/amxmodx/cvars.h b/amxmodx/cvars.h index f267eae6..9d29bc9d 100644 --- a/amxmodx/cvars.h +++ b/amxmodx/cvars.h @@ -11,37 +11,45 @@ #define CVARS_H #include "cvardef.h" -#include "CString.h" +#include class CDetour; class CCVar { cvar_t cvar; - String name; - String plugin; + ke::AString name; + ke::AString plugin; public: CCVar(const char* pname, const char* pplugin, int pflags, float pvalue) : name(pname), plugin(pplugin) { - cvar.name = (char*)name.c_str(); - cvar.flags = pflags; + cvar.name = name.chars(); + cvar.flags = pflags; cvar.string = ""; - cvar.value = pvalue; + cvar.value = pvalue; } - inline cvar_t* getCvar() { + inline cvar_t* getCvar() + { return &cvar; } - inline const char* getPluginName() { - return plugin.c_str(); + + inline const char* getPluginName() + { + return plugin.chars(); } - inline const char* getName() { - return name.c_str(); + + inline const char* getName() + { + return name.chars(); } - inline bool operator == (const char* string) { - return (strcmp(name.c_str(), string) == 0); + + inline bool operator == (const char* string) + { + return name.compare(string) == 0; } + int plugin_id; };