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

header extension bad way #5

Open
IgorTheSimplifier opened this issue Apr 25, 2018 · 1 comment
Open

header extension bad way #5

IgorTheSimplifier opened this issue Apr 25, 2018 · 1 comment

Comments

@IgorTheSimplifier
Copy link
Contributor

trimming your extension is bad way. You need to add whole boost just to perform one action.
From the structure of your algorithm is way better to change it in such way (no need for boos)

vector ext;
for (int i = 4; i < 8; i++)
{
if (header[i] == ' ')
{
break;
}
ext.push_back(header[i]);
}

mExtension = std::string(ext.begin(), ext.end());
@danielcardeenas
Copy link
Owner

Feel free to make a pull request. I did this when i was in school, my code practices weren't the best

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

No branches or pull requests

2 participants