diff --git a/tools/python/src/object_detection.cpp b/tools/python/src/object_detection.cpp index 1447e62ec..2daf209ac 100644 --- a/tools/python/src/object_detection.cpp +++ b/tools/python/src/object_detection.cpp @@ -129,7 +129,7 @@ std::shared_ptr merge_simple_object_detectors ( { DLIB_CASSERT(len(detectors) > 0); std::vector temp; - for (auto& d : detectors) + for (const auto& d : detectors) temp.push_back(d.cast().detector); simple_object_detector_py result;