We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b67dc05 commit e32a4e4Copy full SHA for e32a4e4
cpp/common/test/rules/validcontainerelementaccess/test.cpp
@@ -96,14 +96,14 @@ void f8(const int *ar) {
96
void f9(const std::string &s, std::string &str) {
97
std::string::iterator loc = str.begin();
98
for (auto i = s.begin(), e = s.end(); i != e; ++i, ++loc) { // NON_COMPLIANT
99
- str.insert(loc, 'c'); // NON_COMPLIANT[FALSE POSITIVE for str]
+ str.insert(loc, 'c'); // NON_COMPLIANT[FALSE POSITIVE for str]
100
}
101
102
103
void f10(const std::string &s, std::string &str) {
104
105
for (auto i = s.begin(), e = s.end(); i != e; ++i, ++loc) { // COMPLIANT
106
- loc = str.insert(loc, 'c'); // COMPLIANT[FALSE POSITIVE]
+ loc = str.insert(loc, 'c'); // COMPLIANT[FALSE POSITIVE]
107
108
109
0 commit comments