Skip to content

Fix groupav.c style and avoid casts in toxav_old.c.#1082

Merged
iphydf merged 1 commit intoTokTok:masterfrom
iphydf:groupav-style
Aug 13, 2018
Merged

Fix groupav.c style and avoid casts in toxav_old.c.#1082
iphydf merged 1 commit intoTokTok:masterfrom
iphydf:groupav-style

Conversation

@iphydf
Copy link
Copy Markdown
Member

@iphydf iphydf commented Aug 12, 2018

  • No anonymous structs.
  • No assignment expressions.
  • Only one declarator per struct member declaration.
  • Named callback types only, no inline types.
  • No ; empty statements.
  • ++i instead of i++.

Avoiding a cast in toxav_old.c avoids some potential (and real) bugs.


This change is Reviewable

@iphydf iphydf added this to the v0.2.x milestone Aug 12, 2018
@iphydf iphydf force-pushed the groupav-style branch 3 times, most recently from e1fd22b to 5d2fa96 Compare August 12, 2018 23:34
toxav/groupav.c Outdated
Copy link
Copy Markdown
Member

@hugbubby hugbubby Aug 13, 2018

Choose a reason for hiding this comment

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

What are you some kinda babby who can't handle assigning variables within if statements

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

If this question is serious, let me know and I'll be happy to talk about it.

toxav/groupav.c Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

dear god

toxav/groupav.c Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I actually prefer this for its intuition

Copy link
Copy Markdown
Member

@hugbubby hugbubby left a comment

Choose a reason for hiding this comment

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

The old stuff was actually so bad it blurs the line between style checks and bugfixing

Copy link
Copy Markdown
Member

@hugbubby hugbubby left a comment

Choose a reason for hiding this comment

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

:lgtm_strong:

Reviewable status: :shipit: complete! 1 of 1 approvals obtained

Copy link
Copy Markdown
Member

@hugbubby hugbubby left a comment

Choose a reason for hiding this comment

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

Reviewed 3 of 3 files at r1.
Reviewable status: :shipit: complete! 1 of 1 approvals obtained

* No anonymous structs.
* No assignment expressions.
* Only one declarator per struct member declaration.
* Named callback types only, no inline types.
* No `;` empty statements.
* `++i` instead of `i++`.

Avoiding a cast in toxav_old.c avoids some potential (and real) bugs.
@iphydf iphydf merged commit d518374 into TokTok:master Aug 13, 2018
@iphydf iphydf deleted the groupav-style branch August 13, 2018 10:45
@robinlinden robinlinden modified the milestones: v0.2.x, v0.2.6 Aug 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants