Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@cypof
Copy link
Member

@cypof cypof commented Sep 9, 2016

No description provided.

#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