From 76fd3975edf34b48f0eebc73b13539d8160f11bd Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Tue, 12 Sep 2023 07:34:51 +1000 Subject: [PATCH] Update face_detection.cpp --- face_detector/src/face_detection.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/face_detector/src/face_detection.cpp b/face_detector/src/face_detection.cpp index 7cf7f3c0..a2132a72 100644 --- a/face_detector/src/face_detection.cpp +++ b/face_detector/src/face_detection.cpp @@ -716,7 +716,9 @@ class FaceDetector else { max_id_++; - pos.object_id = static_cast(&(std::ostringstream() << max_id_))->str(); + std::ostringstream oss; + oss << max_id_; + pos.object_id = oss.str(); ROS_INFO_STREAM_NAMED("face_detector", "Didn't find face to match, starting new ID " << pos.object_id); } result_.face_positions.push_back(pos);