File tree Expand file tree Collapse file tree 1 file changed +11
-27
lines changed
Expand file tree Collapse file tree 1 file changed +11
-27
lines changed Original file line number Diff line number Diff line change @@ -284,37 +284,21 @@ void uStraightLineSegment::transform( const Matrix9d & TT)
284284}
285285
286286
287- /* /! Serialization of the uncertain straight line segment t=[l',m',n']' and its bounding box
288- void uStraightLineSegment::serialize( QDataStream & out ) const
289- {
290- //qDebug() << Q_FUNC_INFO;
291- out << m_t;
292- out << m_Cov_tt;
293- out << m_bounding_box;
294- }*/
295-
296-
297- /* /! Deserialization of uncertain straight line segment and its bounding box
298- bool uStraightLineSegment::deserialize( QDataStream & in )
299- {
300- // qDebug() << Q_FUNC_INFO;
301- in >> m_t;
302- in >> m_Cov_tt;
303- in >> m_bounding_box;
304-
305- return in.status() == QDataStream::Ok;
306- }*/
307-
308-
309287// ! Create uncertain straight line segment (for deserialization)
310288std::shared_ptr<uStraightLineSegment>
311289uStraightLineSegment::create ()
312290{
313- return std::shared_ptr<uStraightLineSegment>(
314- new uStraightLineSegment ()
315- );
316- // TODO(meijoc)
317- // return std::make_shared<uStraightLineSegment>(); // why not?
291+ return std::shared_ptr<uStraightLineSegment>(
292+ new uStraightLineSegment ()
293+ );
294+ // return std::make_shared<uStraightLineSegment>();
295+
296+ // Note from
297+ // https://en.cppreference.com/w/cpp/memory/shared_ptr/make_shared.html:
298+ //
299+ // std::shared_ptr<T>(new T(args...)) may call a non-public constructor
300+ // of T if executed in context where it is accessible, while
301+ // std::make_shared requires public access to the selected constructor.
318302}
319303
320304} // namespace Uncertain
You can’t perform that action at this time.
0 commit comments