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

Extract stable_unique to own function for clarity #1559

Merged
merged 12 commits into from
Aug 23, 2018

Conversation

jackgerrits
Copy link
Member

No description provided.

@jackgerrits
Copy link
Member Author

@JohnLangford I would like to add a test to verify stable_unique functions as expected, but it doesn't seem like there are any unit tests for the cpp code at the moment. Do you have a preferred way I can set this up?

@JohnLangford
Copy link
Member

Why do we want to extract the stable_unique function into a .h file? For a function which is only used once, I tend to either leave it inline or (for clarity reasons) extract it into a separate function within the same file.

@jackgerrits
Copy link
Member Author

Putting it in a separate file allows us to easily test it and means it can be easily consumed in future elsewhere in the lib. Considering how generic this is I think it's worth it

@JohnLangford JohnLangford merged commit 103fbfe into VowpalWabbit:master Aug 23, 2018
@jackgerrits jackgerrits deleted the extract_stable_unique branch October 18, 2018 18:46
lokitoth pushed a commit to lokitoth/vowpal_wabbit that referenced this pull request Dec 20, 2019
* Extract stable_unique function

* Fix unnecesarily complex type

* Move stable_unique to own header

* Add stable_unique test

* add project to vw.sln for unit tests

* Remove precompiled header from all configurations
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