File: 0007-fix-nodelet-face_recognition_nodelet.cpp.patch

package info (click to toggle)
ros-opencv-apps 2.0.2-10
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,944 kB
  • sloc: cpp: 6,155; python: 302; xml: 166; makefile: 7
file content (55 lines) | stat: -rw-r--r-- 1,800 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
From: =?utf-8?q?Bernd_M=C3=BCller?= <github@muellerbernd.de>
Date: Mon, 7 Aug 2023 11:07:01 +0200
Subject: fix: nodelet face_recognition_nodelet.cpp

---
 src/nodelet/face_recognition_nodelet.cpp | 22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/src/nodelet/face_recognition_nodelet.cpp b/src/nodelet/face_recognition_nodelet.cpp
index 4bea1fe..02587a7 100644
--- a/src/nodelet/face_recognition_nodelet.cpp
+++ b/src/nodelet/face_recognition_nodelet.cpp
@@ -34,6 +34,7 @@
 
 #include <algorithm>
 #include <boost/filesystem.hpp>
+#include <boost/filesystem/fstream.hpp>
 #include <boost/shared_ptr.hpp>
 #include <boost/thread.hpp>
 #include <boost/version.hpp>
@@ -89,15 +90,15 @@ namespace filesystem3
 namespace filesystem
 {
 #endif
-template <>
-path& path::append<typename path::iterator>(typename path::iterator lhs, typename path::iterator rhs,
-                                            const codecvt_type& cvt)
-{
-  for (; lhs != rhs; ++lhs)
-    *this /= *lhs;
-  return *this;
-}
-path user_expanded_path(const path& p)
+// template <>
+// path& path::append<typename path::iterator>(typename path::iterator lhs, typename path::iterator rhs,
+//                                             const codecvt_type& cvt)
+// {
+//   for (; lhs != rhs; ++lhs)
+//     *this /= *lhs;
+//   return *this;
+// }
+fs::path user_expanded_path(const path& p)
 {
   path::const_iterator it(p.begin());
   std::string user_dir = (*it).string();
@@ -122,7 +123,8 @@ path user_expanded_path(const path& p)
     homedir = pw->pw_dir;
   }
   ret = path(std::string(homedir));
-  return ret.append(++it, p.end(), path::codecvt());
+  // return ret.append(++it, p.end(), path::codecvt());
+  return ret / p;
 }
 }  // namespace filesystem
 }  // namespace boost