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

Avoids missing return values during build. #4703

Merged
merged 1 commit into from
Nov 19, 2016

Conversation

cypof
Copy link
Member

@cypof cypof commented Sep 9, 2016

No description provided.

@@ -67,6 +67,7 @@ shared_ptr<Layer<Dtype> > GetConvolutionLayer(
#endif
} else {
LOG(FATAL) << "Layer " << param.name() << " has unknown engine.";
throw; // Avoids missing return warning
Copy link
Member

Choose a reason for hiding this comment

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

return NULL is more clear than throw at least in my reading, and consistent with #3362.

@cypof
Copy link
Member Author

cypof commented Sep 27, 2016

I tried, but the methods return shared_ptr, for which NULL is not a valid value. We could return shared_ptr<Layer<Dtype> >(), but it's not very readable.

@shelhamer shelhamer merged commit 473f143 into BVLC:master Nov 19, 2016
@shelhamer
Copy link
Member

Ok fine, seems like an inconsequential and perhaps necessary evil. If anybody sees a more stylish resolution of this, give a shout.

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.

2 participants