summaryrefslogtreecommitdiffstats
path: root/core/qthelper.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2020-10-26 07:24:18 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-10-26 19:27:03 -0700
commitaa5f2e7c735e1b9a00647a9a6b6797044c60ec4a (patch)
tree75cf708b9bd4b0ac5ed6af8db7c59e35815f93ef /core/qthelper.cpp
parentc5fcdfae30b95c6ddc1d30ec34584dcff735ccd0 (diff)
downloadsubsurface-aa5f2e7c735e1b9a00647a9a6b6797044c60ec4a.tar.gz
cleanup: replace deprecated sprintf()/vsprintf() calls
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/qthelper.cpp')
-rw-r--r--core/qthelper.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/qthelper.cpp b/core/qthelper.cpp
index 889d08b60..d3e225639 100644
--- a/core/qthelper.cpp
+++ b/core/qthelper.cpp
@@ -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;
}