Fixed few memory leeks.

This commit is contained in:
Ianos Gnatiuc
2007-01-08 12:09:42 +00:00
parent 3750658bf2
commit 18d26cabfc
23 changed files with 111 additions and 55 deletions

View File

@@ -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); }

View File

@@ -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;

View File

@@ -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);