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

Replace set with vector or another structure that doesn't change the order of the elements #91

Open
mohd109 opened this issue Nov 16, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@mohd109
Copy link

mohd109 commented Nov 16, 2023

Hi,
First of all, thanks a lot for your effort since this library came in handy. Just wanted to mention that using set has a problem when we want to read and output the segments, lines, and other parts of the file in the same order. Using vector can easily prevent that since it has no comparator. We did it for our case.

@pageldev
Copy link
Owner

Hi, thanks! Appreciate it.

Makes sense. Can you point me to the places in the code where you have replaced this? Alternatively, you can also create a pull request and I'll take a look at it. I just want to check if this has any side effects.

@pageldev pageldev added the enhancement New feature or request label Nov 25, 2023
@mohd109
Copy link
Author

mohd109 commented Nov 26, 2023

Anytime!
I'm going to share the code with you in Google Drive.
https://drive.google.com/file/d/1vCdrpefi7ZhSYy663xPy6Omk2J-BXtAb/view?usp=sharing
The changes are basically wherever "set" was used, and replacement of the push_back and insert ones to be compatible with vector. Didn't test the performance though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants