diff --git a/samples/Jzon.cpp b/samples/Jzon.cpp index f8503718..3c725369 100644 --- a/samples/Jzon.cpp +++ b/samples/Jzon.cpp @@ -1011,10 +1011,10 @@ namespace Jzon { std::stack > nodeStack; - std::string name = ""; + std::string name; - Token token; - while (!tokens.empty()) + Token token; + while (!tokens.empty()) { token = tokens.front(); tokens.pop(); diff --git a/src/exiv2.cpp b/src/exiv2.cpp index 08b7c8da..317887e5 100644 --- a/src/exiv2.cpp +++ b/src/exiv2.cpp @@ -1518,7 +1518,7 @@ namespace { std::string parseEscapes(const std::string& input) { - std::string result = ""; + std::string result; for (unsigned int i = 0; i < input.length(); ++i) { char ch = input[i]; if (ch != '\\') { @@ -1571,7 +1571,7 @@ namespace { break; } - std::string ucs2toUtf8 = ""; + std::string ucs2toUtf8; ucs2toUtf8.push_back((char) ((acc & 0xff00) >> 8)); ucs2toUtf8.push_back((char) (acc & 0x00ff)); diff --git a/src/image.cpp b/src/image.cpp index 35738e5e..7184b15a 100644 --- a/src/image.cpp +++ b/src/image.cpp @@ -376,7 +376,7 @@ namespace Exiv2 { throw Error(kerInvalidTypeValue); } - std::string sp = "" ; // output spacer + std::string sp; // output spacer //prepare to print the value uint32_t kount = isPrintXMP(tag,option) ? count // haul in all the data diff --git a/src/olympusmn_int.cpp b/src/olympusmn_int.cpp index 8d2550b4..67fdac59 100644 --- a/src/olympusmn_int.cpp +++ b/src/olympusmn_int.cpp @@ -1481,7 +1481,7 @@ namespace Exiv2 { // If value 2 is present, it is used instead of value 1. if (value.count() > 1) { - std::string p = ""; // Used to enable ',' separation + std::string p; // Used to enable ',' separation v = (uint16_t)value.toLong(1); for (int i = 0; focusModes1[i].val != 0; i++) { diff --git a/src/pngimage.cpp b/src/pngimage.cpp index e50f7afa..80ebc977 100644 --- a/src/pngimage.cpp +++ b/src/pngimage.cpp @@ -271,7 +271,7 @@ namespace Exiv2 { // format output const int iMax = 30 ; const uint32_t blen = dataOffset > iMax ? iMax : dataOffset ; - std::string dataString = ""; + std::string dataString; // if blen == 0 => slice construction fails if (blen > 0) { std::stringstream ss; diff --git a/src/xmp.cpp b/src/xmp.cpp index f16ced98..4b769a83 100644 --- a/src/xmp.cpp +++ b/src/xmp.cpp @@ -502,7 +502,7 @@ namespace Exiv2 { std::map* p = (std::map*) refCon; std::map& m = *p; - std::string b(""); + std::string b; if ( bNS ) { // store the NS in dict[""] m[b]=out; } else if ( m.find(b) != m.end() ) { // store dict[uri] = dict[""]