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

Cleanup PR 4127 #4153

Merged
merged 6 commits into from Feb 6, 2018
Merged

Conversation

dhelekal
Copy link
Contributor

@dhelekal dhelekal commented Feb 5, 2018

No description provided.

@@ -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)"
Copy link
Member

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

Copy link
Contributor Author

@dhelekal dhelekal Feb 5, 2018

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")
Copy link
Member

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)
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

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.

Copy link
Member

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

@vigsterkr vigsterkr merged commit 56ae5e1 into shogun-toolbox:develop Feb 6, 2018
@dhelekal dhelekal deleted the feature/cleanup/pr/4127 branch February 6, 2018 14:54
ktiefe pushed a commit to ktiefe/shogun that referenced this pull request Jul 30, 2019
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.

None yet

2 participants