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

Fix some type errors #82

Merged
merged 1 commit into from Aug 14, 2016
Merged

Fix some type errors #82

merged 1 commit into from Aug 14, 2016

Conversation

cisoun
Copy link
Contributor

@cisoun cisoun commented Jul 18, 2016

I had some troubles to compile Calf because of some type/casting errors.
Fixed that by forcing the types.
(Was it a good idea ?)

@@ -226,7 +226,7 @@ void jack_client::calculate_plugin_order(std::vector<int> &indices)
map<string, int>::const_iterator p = port_to_plugin.find((*k) + cnlen + 1);
if (p != port_to_plugin.end())
{
run_before.insert(make_pair<int, int>(p->second, i));
run_before.insert(make_pair<const int&, unsigned int&>(p->second, i));

Choose a reason for hiding this comment

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

I think it would be simpler to call the std::pair constructor directly here, like this:

run_before.insert(pair<int, int>(p->second, i));

Choose a reason for hiding this comment

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

Or maybe like this (which also seems to work):

run_before.insert(make_pair(p->second, i));

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup, make_pair(p->second, i) did the job for me too.
The other changes are still necessary though.

@boomshop
Copy link
Member

Thanks for fixing! Are all changes and improvements jcowgill mentioned committed in this request? Then I would simply merge it.

@SpotlightKid
Copy link

This also affects the Arch Linux AUR package calf-git. I created a patch based on this PR and the comments:

https://gist.github.com/cd95da22217ba74373e0770b2aff879e

@boomshop boomshop merged commit e7daf55 into calf-studio-gear:master Aug 14, 2016
@boomshop
Copy link
Member

Thanks!

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

4 participants