Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix the wording "counter example"#129

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
pieterhijma wants to merge1 commit intoFreeCAD:main
base:main
Choose a base branch
Loading
frompieterhijma:fix-counter-example

Conversation

@pieterhijma
Copy link
Contributor

Make a small fix in reaction tothis feedback by@benj5378.

@hyarion
Copy link
Contributor

I think we could make it more clear what is good and what is bad.
Maybe we could do something in the same style as the core guidelines (example fromhttps://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#f16-for-in-parameters-pass-cheaply-copied-types-by-value-and-others-by-reference-to-const):

voidf1(const string& s);// OK: pass by reference to const; always cheapvoidf2(string s);// bad: potentially expensivevoidf3(int x);// OK: Unbeatablevoidf4(constint& x);// bad: overhead on access in f4()

in this case it could look like:

auto value = randomThing.weirdProperty->getValue();// bad: non-obvious typelong value = randomThing.weirdProperty->getValue();// OK: type is specified, no need to guess type
kadet1090 reacted with thumbs up emoji

@maxwxyz
Copy link
Contributor

@pieterhijma are you going to update this?

@pieterhijma
Copy link
ContributorAuthor

@pieterhijma are you going to update this?

Yes, I just did :)

@pieterhijma
Copy link
ContributorAuthor

@hyarion, could you please review?

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

1 more reviewer

@benj5378benj5378benj5378 approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@pieterhijma@hyarion@maxwxyz@benj5378

[8]ページ先頭

©2009-2025 Movatter.jp