From cf848e52330fa0bca2ccc0fb5de5f2a4033fbafa Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Sat, 10 May 2014 21:37:18 -0300 Subject: Correct the usage of std::string and QString QStrings shouldn't be == "" to check for empty string, use .isEmpty() QStrings shouldn't be != "" to check for non empty, use .size() std::string shouldn't be cleared with = "", use .clear() Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-ui/exif.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'qt-ui/exif.cpp') diff --git a/qt-ui/exif.cpp b/qt-ui/exif.cpp index 2614d52e6..82601577f 100644 --- a/qt-ui/exif.cpp +++ b/qt-ui/exif.cpp @@ -525,15 +525,15 @@ int EXIFInfo::parseFromEXIFSegment(const unsigned char *buf, unsigned len) void EXIFInfo::clear() { // Strings - ImageDescription = ""; - Make = ""; - Model = ""; - Software = ""; - DateTime = ""; - DateTimeOriginal = ""; - DateTimeDigitized = ""; - SubSecTimeOriginal = ""; - Copyright = ""; + ImageDescription.clear(); + Make.clear(); + Model.clear(); + Software.clear(); + DateTime.clear(); + DateTimeOriginal.clear(); + DateTimeDigitized.clear(); + SubSecTimeOriginal.clear(); + Copyright.clear(); // Shorts / unsigned / double ByteAlign = 0; -- cgit v1.2.3-70-g09d2