Don't shadow object members like this

If you need to use this->error to distinguish the local variable from the
object membe that should be a hint that maybe you didn't pick the best
name for the local variable.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2014-02-12 05:51:25 -08:00
parent 11559f1704
commit 4f522d79d8

View file

@ -421,12 +421,12 @@ static QString str_error(const char *fmt, ...)
void DownloadThread::run()
{
const char *error;
const char *errorText;
import_thread_cancelled = false;
if (!strcmp(data->vendor, "Uemis"))
error = do_uemis_import(data->devname, data->force_download);
errorText = do_uemis_import(data->devname, data->force_download);
else
error = do_libdivecomputer_import(data);
if (error)
this->error = str_error(error, data->devname, data->vendor, data->product);
errorText = do_libdivecomputer_import(data);
if (errorText)
error = str_error(errorText, data->devname, data->vendor, data->product);
}