readability-redundant-string-init.rst 713 Bytes

readability-redundant-string-init

Finds unnecessary string initializations.

Examples

// Initializing string with empty string literal is unnecessary.
std::string a = "";
std::string b("");

// becomes

std::string a;
std::string b;

Options