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

Superfluous calls to base constructors #26

Open
ypiguet-epfl opened this issue Jun 15, 2017 · 1 comment
Open

Superfluous calls to base constructors #26

ypiguet-epfl opened this issue Jun 15, 2017 · 1 comment
Labels

Comments

@ypiguet-epfl
Copy link
Contributor

In dashel-posix.cpp and dashel-win32.cpp, constructors of Stream subclasses call explicitly the Stream constructor even when there is an intermediate class in the class hierarchy and they already call the Stream constructor indirectly. For example in dashel-posix.cpp, SocketStream::SocketStream calls both Stream("tcp") and DisconnectableStream("tcp") while DisconnectableStream::DisconnectableStream already calls Stream::Stream with the correct parameter.

@stephanemagnenat
Copy link
Member

stephanemagnenat commented Jun 15, 2017

This looks stupid indeed. I am really wondering why we did it that way, there might have been a reason, but I cannot recall that. Maybe we changed the class hierarchy after an initial draft and this is just a historical left-over, or it was to work-around an old compiler bug?

We should clean it. What I miss in Dashel is a set of proper end-to-end tests. These could be simple, using ctest bundled with cmake, and should test basic behaviours of the different components. I've added an issue, #27.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants