-
Notifications
You must be signed in to change notification settings - Fork 24
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
don't use exceptions when non-exceptional methods are available #389
Conversation
@@ -163,67 +227,4 @@ breadth_iterator Morphology::breadth_end() const { | |||
return breadth_iterator(); | |||
} | |||
|
|||
SomaType getSomaType(long unsigned int num_soma_points) { | |||
try { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved to anonymous namespace and replaced the try
w/ a switch
src/morphology.cpp
Outdated
return morphio::SOMA_SINGLE_POINT; | ||
case 2: | ||
return morphio::SOMA_UNDEFINED; | ||
default:; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is how clang-format
wanted this; FYI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One could fold the return below into the switch, but maybe some other linting thing then complains?
No description provided.