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

No scanf tokenstream #460

Open
wants to merge 35 commits into
base: master
Choose a base branch
from
Open

No scanf tokenstream #460

wants to merge 35 commits into from

Conversation

mgeplf
Copy link
Contributor

@mgeplf mgeplf commented Jun 21, 2023

No description provided.

@mgeplf mgeplf mentioned this pull request Jun 23, 2023
@mgeplf
Copy link
Contributor Author

mgeplf commented Jun 23, 2023

It passes all the tests, including the ones from NeuroM. Please let me know if it's understandable.

@mgeplf
Copy link
Contributor Author

mgeplf commented Jul 3, 2023

As of 081aeca this improves performance (parsing an SWC goes from 1.01ms to 0.817ms) and supports locales.

@@ -153,12 +152,21 @@ class ErrorMessages
/** Section self parent error message */
std::string ERROR_SELF_PARENT(const Sample& sample) const;

/** The end of the file was reached before parsing finshed */
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
/** The end of the file was reached before parsing finshed */
/** The end of the file was reached before parsing finished */

Comment on lines +4 to +6
#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
#define freelocale _free_locale
#define strtol_l _strtol_l
Copy link
Collaborator

@eleftherioszisis eleftherioszisis May 27, 2024

Choose a reason for hiding this comment

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

Maybe add a comment here concerning the freelocale?

Comment on lines +25 to +31
#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
: locale(_create_locale(LC_ALL, "C")) {
}
#else
: locale(newlocale(LC_NUMERIC_MASK, "POSIX", nullptr)) {
}
#endif
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same here. It's not clear to me why these are configured this way.

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.

None yet

2 participants