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

Avoid string conversions in FieldMap.Get{FieldType} where possible #767

Merged
merged 3 commits into from
Jan 20, 2024

Conversation

Rob-Hague
Copy link
Contributor

The type checks e.g. in GetInt check that the type of the retrieved field is exactly IntField. For a type derived from IntField such as MsgSeqNum, the check returns false and the returned value is parsed from the string representation of the field.

This change replaces the type check with an is operator to allow returning the actual int value in this case.

kirsan31 added a commit to kirsan31/quickfixn that referenced this pull request Aug 18, 2023
@gbirchmeier gbirchmeier merged commit 585fcdf into connamara:master Jan 20, 2024
2 checks passed
@Rob-Hague Rob-Hague deleted the getfield branch January 21, 2024 08:37
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