Found a subscript expressions on the STL container that can be further simplified directly using subscript operator.
For instance in case of string where you may call string.data()
over directly
indexing the std::string
.
To fix, consider subscripting directly over container type rather than getting a pointer first.
std::string s = "...";
int i = 0;
char c = s.data()[i]; // can be simplified to char c = s[i];
std::string s = "...";
int i = 0;
char c = s[i];