Fix several clazy issue:
* Missing reference in range-for with non trivial type [-Wclazy-range-loop-reference]
This commit is contained in:
@@ -118,7 +118,7 @@ PyObject* CommandPy::listByShortcut(PyObject *args)
|
||||
|
||||
PyObject* pyList = PyList_New(matches.size());
|
||||
int i=0;
|
||||
for (std::string match : matches) {
|
||||
for (const std::string& match : matches) {
|
||||
PyObject* str = PyUnicode_FromString(match.c_str());
|
||||
PyList_SetItem(pyList, i++, str);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user