diff options
author | Erik Verbruggen <erik.verbruggen@qt.io> | 2016-10-06 12:26:54 +0200 |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@qt.io> | 2016-10-06 13:42:46 +0000 |
commit | a1268320b93be2d47e16ef143838825597a20312 (patch) | |
tree | f512a0e7359bd0b54ce79f9d74ae46a888d19144 | |
parent | a93379343e8f923b8095316200fb8667587a0edd (diff) |
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 <alexander.blasche@qt.io>
-rw-r--r-- | src/plugins/geoservices/osm/qgeofiletilecacheosm.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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<QGeoTileTexture> QGeoFileTileCacheOsm::get(const QGeoTileSpec &sp QSharedPointer<QGeoTileTexture> tt = getFromMemory(spec); if (tt) return tt; - if (tt = getFromOfflineStorage(spec)) + if ((tt = getFromOfflineStorage(spec))) return tt; return getFromDisk(spec); } |