mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
cleanup: replace deprecated sprintf()/vsprintf() calls
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
c5fcdfae30
commit
aa5f2e7c73
2 changed files with 3 additions and 3 deletions
|
@ -18,7 +18,7 @@ static QString str_error(const char *fmt, ...)
|
|||
{
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
const QString str = QString().vsprintf(fmt, args);
|
||||
const QString str = QString().vasprintf(fmt, args);
|
||||
va_end(args);
|
||||
|
||||
return str;
|
||||
|
|
|
@ -105,11 +105,11 @@ QString printGPSCoords(const location_t *location)
|
|||
lonmin = (lon % 1000000U) * 60U;
|
||||
latsec = (latmin % 1000000) * 60;
|
||||
lonsec = (lonmin % 1000000) * 60;
|
||||
result.sprintf("%u°%02d\'%06.3f\"%s %u°%02d\'%06.3f\"%s",
|
||||
result.asprintf("%u°%02d\'%06.3f\"%s %u°%02d\'%06.3f\"%s",
|
||||
latdeg, latmin / 1000000, latsec / 1000000, qPrintable(lath),
|
||||
londeg, lonmin / 1000000, lonsec / 1000000, qPrintable(lonh));
|
||||
} else {
|
||||
result.sprintf("%f %f", (double) lat / 1000000.0, (double) lon / 1000000.0);
|
||||
result.asprintf("%f %f", (double) lat / 1000000.0, (double) lon / 1000000.0);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue