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
Cleanup PR 4127 #4153
Cleanup PR 4127 #4153
Conversation
scripts/check_format.sh
Outdated
@@ -41,7 +41,7 @@ function check_shogun_style { | |||
fi | |||
done | |||
|
|||
RESULT_OUTPUT="$(git clang-format-3.8 --commit $BASE_COMMIT --diff --binary `which clang-format-3.8` $LIST)" |
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.
need to get the Docker image fixed for this on travis
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.
Yeah, sorry, i didnt want to commit that change.
It's just to make the style checker run locally. Working on reverting this.
auto r_combined = dynamic_cast<CCombinedFeatures*>(r); | ||
|
||
if (!l_combined || !r_combined) | ||
SG_ERROR("Cast failed - unsupported features passed") |
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.
imo this will never happen (unless l or r is null) since if the typecasting fails it'll throw a bad_casting exception.
@@ -138,6 +131,8 @@ bool CCombinedKernel::init_with_extracted_subsets( | |||
"No kernel matrix was assigned to this Custom kernel\n") | |||
|
|||
auto k_custom = dynamic_cast<CCustomKernel*>(k); | |||
if (!k_custom) |
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.
same as above, see http://en.cppreference.com/w/cpp/language/dynamic_cast
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.
As we're casting a pointer type, it should be NULL on fail afaik? From the website:
If the cast fails and new_type is a pointer type, it returns a null pointer of that type.
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.
/me should really RTFM before saying RTFM
No description provided.