Patch from Melchior Franz:

This module works mostly with char* and allocates memory with
strdup ... delete doesn't go well with malloc(). The transition
to string only would be nice, but some class interfaces return
char*, so it was more natural to just drop the deletes.
This commit is contained in:
david
2002-03-27 11:42:09 +00:00
parent be5d365348
commit d0d7878e0a

View File

@@ -136,7 +136,7 @@ SGTime::~SGTime()
if ( zonename != NULL ) {
char *tmp = zonename;
zonename = NULL;
delete tmp;
free(tmp);
}
}
@@ -302,7 +302,7 @@ void SGTime::updateLocal( double lon, double lat, const string& root ) {
if ( zonename ) {
char *ptr = zonename;
zonename = NULL;
delete ptr;
free(ptr);
}
zonename = strdup( zone.c_str() );