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

Removed 'm_' prefix in socket config structs #1839

Merged

Conversation

maxsharabayko
Copy link
Collaborator

CSrtConfig, CSrtMuxerConfig and others as of now are structures.
They allow public access to their members. Members currently have m_ prefix, which is intended to identify private members.

Changes:

  • Removed m_ prefix of members in CSrtConfig, CSrtMuxerConfig etc.
  • A function returning pointer to char must have a pc prefix instead of pv, therefore renamed pvUDPRcvBufSize() et al to pcUDPRcvBufSize() et al according to Hungarian notation.
const char* pcUDPRcvBufSize() const;

@maxsharabayko maxsharabayko added Type: Maintenance Work required to maintain or clean up the code [core] Area: Changes in SRT library core labels Mar 3, 2021
@maxsharabayko maxsharabayko added this to the v1.4.3 milestone Mar 3, 2021
@maxsharabayko maxsharabayko self-assigned this Mar 3, 2021
srtcore/channel.cpp Outdated Show resolved Hide resolved
srtcore/congctl.h Outdated Show resolved Hide resolved
Copy link
Collaborator

@ethouris ethouris left a comment

Choose a reason for hiding this comment

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

Consider ^

@ethouris
Copy link
Collaborator

ethouris commented Mar 3, 2021

Ah, note: this pv prefix in the functions was because it was reporting a "pointer to variable". This has also nothing to do with const char* type - Hungarian notation is not required for functions. I understood you renamed this to pc because you wanted to return a constant value, although AFAIR this is used for both setting and retrieving options, so that doesn't sound correct.

@maxsharabayko maxsharabayko marked this pull request as ready for review March 4, 2021 12:32
@maxsharabayko maxsharabayko merged commit 12d03fe into Haivision:master Mar 4, 2021
@maxsharabayko maxsharabayko deleted the develop/rename-sockconfig branch March 4, 2021 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[core] Area: Changes in SRT library core Type: Maintenance Work required to maintain or clean up the code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants