Fixed few memory leeks.
This commit is contained in:
@@ -65,7 +65,7 @@ public:
|
||||
int originno; // Origin number
|
||||
uint board; // Board number (Hudson/Goldbase/Ezycom/PCBoard fmts)
|
||||
uint type; // Type of msgarea (GMB_xxx)
|
||||
const char *basetype; // Type of msgbase
|
||||
std::string basetype; // Type of msgbase
|
||||
ftn_addr aka; // The AKA to use in the area
|
||||
ftn_attr attr; // Default attributes
|
||||
byte scan : 1; // TRUE if listed with AREASCAN
|
||||
@@ -77,7 +77,7 @@ public:
|
||||
|
||||
int setorigin(std::string& origin);
|
||||
|
||||
bool isseparator() const { return streql(basetype, "SEPARATOR"); }
|
||||
bool isseparator() const { return (basetype == "SEPARATOR"); }
|
||||
|
||||
bool isnet() const { return !!(type & GMB_NET); }
|
||||
bool isecho() const { return !!(type & GMB_ECHO); }
|
||||
|
@@ -358,19 +358,19 @@ void gareafile::ReadHPTFile(char* path, char* file, char* origin, int group) {
|
||||
switch(aa.type) {
|
||||
case GMB_NET:
|
||||
aa.attr = attribsnet;
|
||||
if(*aa.basetype == '\0')
|
||||
if (aa.basetype.empty())
|
||||
aa.basetype = fidomsgtype;
|
||||
AddNewArea(aa);
|
||||
break;
|
||||
case GMB_ECHO:
|
||||
aa.attr = attribsecho;
|
||||
if(*aa.basetype == '\0')
|
||||
if (aa.basetype.empty())
|
||||
aa.basetype = fidomsgtype;
|
||||
AddNewArea(aa);
|
||||
break;
|
||||
case GMB_LOCAL:
|
||||
aa.attr = attribslocal;
|
||||
if(*aa.basetype == '\0')
|
||||
if (aa.basetype.empty())
|
||||
aa.basetype = fidomsgtype;
|
||||
AddNewArea(aa);
|
||||
break;
|
||||
|
@@ -83,7 +83,7 @@ void gareafile::ReadAdeptXbbsFile(char* path, char* file, char* options) {
|
||||
break;
|
||||
case CRC_AREAEND:
|
||||
aa.setechoid(*usenet ? usenet : name);
|
||||
if(streql(aa.basetype, "OPUS") or streql(aa.basetype, "FTS1"))
|
||||
if ((aa.basetype == "OPUS") || (aa.basetype == "FTS1"))
|
||||
aa.setpath(apath);
|
||||
else {
|
||||
sprintf(buf, "%s%s", apath, name);
|
||||
|
@@ -81,7 +81,7 @@ public:
|
||||
int areaid() const { return cfg.areaid; }
|
||||
int groupid() const { return cfg.groupid; }
|
||||
uint type() const { return cfg.type; }
|
||||
const char *basetype() const { return cfg.basetype; }
|
||||
const std::string &basetype() const { return cfg.basetype; }
|
||||
uint board() const { return cfg.board; }
|
||||
const ftn_addr& aka() const { return cfg.aka; }
|
||||
int originno() const { return cfg.originno; }
|
||||
@@ -104,6 +104,7 @@ public:
|
||||
void set_groupid(int g) { cfg.groupid = g; }
|
||||
void set_type(uint t) { cfg.type = t; }
|
||||
void set_basetype(const char *m) { cfg.basetype = m; }
|
||||
void set_basetype(const std::string &m) { cfg.basetype = m; }
|
||||
void set_board(uint b) { cfg.board = b; }
|
||||
void set_aka(ftn_addr& a) { cfg.aka = a; }
|
||||
void set_originno(int o) { cfg.originno = o; }
|
||||
|
@@ -139,7 +139,7 @@ protected:
|
||||
FidoWide* wide;
|
||||
FidoData* data;
|
||||
|
||||
inline bool isopus() const { return streql(cfg.basetype, "OPUS"); }
|
||||
inline bool isopus() const { return (cfg.basetype == "OPUS"); }
|
||||
|
||||
void data_open();
|
||||
void data_close();
|
||||
|
Reference in New Issue
Block a user