From a1268320b93be2d47e16ef143838825597a20312 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Thu, 6 Oct 2016 12:26:54 +0200 Subject: Fix assignment-as-condition warning qgeofiletilecacheosm.cpp:71:12: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] if (tt = getFromOfflineStorage(spec)) ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ qgeofiletilecacheosm.cpp:71:12: note: place parentheses around the assignment to silence this warning if (tt = getFromOfflineStorage(spec)) ^ ( ) qgeofiletilecacheosm.cpp:71:12: note: use '==' to turn this assignment into an equality comparison if (tt = getFromOfflineStorage(spec)) ^ == Assuming this is not meant to be a comparisson but a check if the return value is not-0, I added the parentheses. Change-Id: Ic4e14d7ea8cc5283c70d061433fe482ee4e8b38b Reviewed-by: Alex Blasche --- src/plugins/geoservices/osm/qgeofiletilecacheosm.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/geoservices/osm') diff --git a/src/plugins/geoservices/osm/qgeofiletilecacheosm.cpp b/src/plugins/geoservices/osm/qgeofiletilecacheosm.cpp index a8429f3d..5028a82b 100644 --- a/src/plugins/geoservices/osm/qgeofiletilecacheosm.cpp +++ b/src/plugins/geoservices/osm/qgeofiletilecacheosm.cpp @@ -68,7 +68,7 @@ QSharedPointer QGeoFileTileCacheOsm::get(const QGeoTileSpec &sp QSharedPointer tt = getFromMemory(spec); if (tt) return tt; - if (tt = getFromOfflineStorage(spec)) + if ((tt = getFromOfflineStorage(spec))) return tt; return getFromDisk(spec); } -- cgit v1.2.1