clang-tidy: remove pointless string init

Found with readability-redundant-string-init

Signed-off-by: Rosen Penev <rosenp@gmail.com>
main
Rosen Penev 4 years ago committed by Luis Díaz Más
parent 143a1fbbe2
commit 9642e3cceb

@ -1011,10 +1011,10 @@ namespace Jzon
{
std::stack<std::pair<std::string, Node*> > nodeStack;
std::string name = "";
std::string name;
Token token;
while (!tokens.empty())
Token token;
while (!tokens.empty())
{
token = tokens.front();
tokens.pop();

@ -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));

@ -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

@ -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++) {

@ -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;

@ -502,7 +502,7 @@ namespace Exiv2 {
std::map<std::string,std::string>* p = (std::map<std::string,std::string>*) refCon;
std::map<std::string,std::string>& 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[""]

Loading…
Cancel
Save