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 type of parameter in dc_block::operator= function #64

Merged
merged 4 commits into from
Jun 3, 2023

Conversation

propeller3D
Copy link
Contributor

This pull request addresses a type mismatch issue in the dc_block::operator= function.

In the current implementation, the operator= function is declared to take a bool parameter. However it should accept a float instead.

Change the bool parameter type in dc_block::operator= to float.

@djowel
Copy link
Member

djowel commented Jun 3, 2023

Can you also 'fix' the docs? It's just a text file *.adoc

@djowel
Copy link
Member

djowel commented Jun 3, 2023

Oh, please update to the latest develop and update the PR to fix the gcc build problem.

@propeller3D
Copy link
Contributor Author

I have changed it now but I have another question before I continue. The parameter is "dc_block::operator=(float y_)" but everywhere else you seem to be using "_y". Should I change this as well? I assume that you are using it to differentiate the parameter from the output value y. This is the case in the adoc as well.

@djowel
Copy link
Member

djowel commented Jun 3, 2023

I have changed it now but I have another question before I continue. The parameter is "dc_block::operator=(float y_)" but everywhere else you seem to be using "_y". Should I change this as well? I assume that you are using it to differentiate the parameter from the output value y. This is the case in the adoc as well.

Oh good point! Please do! :-)

Edit: Ah wait, no. I use y_ for arguments that clash with member variables. But for API documentation, it's better to just have it as y, since the member variables are hidden and private anyway.

Had a look at where in the documentation. Likewise, in those cases, it's better to just use y (in quick-start). That being _y is probably an artifact of its prior use as a member variable.

Edit2: Oh, and indeed it is a member variable! It is not an artifact.

@djowel djowel merged commit 1e71828 into cycfi:develop Jun 3, 2023
@djowel
Copy link
Member

djowel commented Jun 3, 2023

Merged! Thank you!

@djowel djowel mentioned this pull request Jun 3, 2023
@propeller3D
Copy link
Contributor Author

I didn’t change the y_ in the code. You closed just before I tried to push the latest. I only changed from bool to float in the declaration, the implementation and in the documentation of the dc_block operator =

@djowel
Copy link
Member

djowel commented Jun 3, 2023

I didn’t change the y_ in the code. You closed just before I tried to push the latest. I only changed from bool to float in the declaration, the implementation and in the documentation of the dc_block operator =

It's OK. I'll do it here. Many thanks!

@djowel
Copy link
Member

djowel commented Jun 3, 2023

Done :-)

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