Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mrpt graphslam improvements #824

Merged
merged 6 commits into from
Sep 4, 2018

Conversation

bergercookie
Copy link
Contributor

Changed apps/libraries

  • mrpt_graphslam (mostly)

PR Description

PR includes a parital cleanup of the mrpt_graphslam library. This mostly includes the newer C++11 syntax and constructs (see #697)


I acknowledge to have:

(Notify: @MRPT/owners )

@jlblancoc
Copy link
Member

Awesome, thanks for not forgetting! ;-)

Just curious: why do you prefer explicitly defining dtors as =default instead of simply not declaring them? I think all base classes and data members are "trivial" (not raw pointers or complexities alike), right? Probably you did it for some reason...

It seems we (again) have the Docker auth problem within Travis for this PR... Will test the code manually (tomorrow?) and merge then.

@Logrus
Copy link
Contributor

Logrus commented Aug 30, 2018

@jlblancoc
Copy link
Member

Thanks @Logrus !

Indeed, that justifies using default instead of an empty body.

But then my next question is: wouldn't it be more compact and totally equivalent just NOT defining any ctor/dtor at all if all data members are trivial? It would make the code a little shorter... ;-)


MRPT_START;
MRPT_LOG_DEBUG_STREAM("In initializeSlamMetricVisualization...");
ASSERTDEB_(m_visualize_SLAM_metric);

// initialize the m_win_plot on the stack
m_win_plot = new CDisplayWindowPlots(
"Evolution of SLAM metric - Deformation Energy (1:1000)", 400, 300);
m_win_plot.reset(new mrpt::gui::CDisplayWindowPlots(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer std::make_shared<mrpt::gui::CDisplayWindowPlots>("Evolution of SLAM metric - Deformation Energy (1:1000)", 400, 300));

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I of course meant std::make_unique

@bergercookie
Copy link
Contributor Author

Just curious: why do you prefer explicitly defining dtors as =default instead of simply not declaring them?

I slightly prefer default just because it makes it explicit

@jlblancoc jlblancoc merged commit 7423385 into MRPT:master Sep 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants