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

fixed compile errors on Ubuntu Linux - Swift 4.2 #20

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

fixed compile errors on Ubuntu Linux - Swift 4.2 #20

wants to merge 2 commits into from

Conversation

popaaaandrei
Copy link

Foundation libs now unify the signature of scanInt and isAtEnd .

@p2
Copy link
Member

p2 commented Nov 8, 2018

That's cool! So for scanInt and isAtEnd, the if-else flags are no longer needed at all, and therefore the whole fhir_* method can be removed?

@popaaaandrei
Copy link
Author

Yes, but I need to test it more because the app crashed one time when generating effectiveDateTime. Don’t merge it yet.

@popaaaandrei
Copy link
Author

The crash was caused by force unwrapping optionals in DateAndTime parse() method. Apparently on Linux calendar.dateComponents() doesn't return nanosecond component.

Copy link

@raheelsayeed raheelsayeed left a comment

Choose a reason for hiding this comment

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

Some comments:

  1. DateAndTime.swift changes should also apply to the file in fhir-parser-resources, as that's where this file is generated from through the script.
  2. Both fhir_isAtEnd and fhir_scanInt no longer need the#if os(Linux) #else since both Linux and Mac implementations are the same.
  3. fhir_scanString also may not need if-else due to the above point. It should still use if scanString, though, so the fix is to simply replace NSString with String and then return it without the as String in the current Mac version.
  4. Using tabs and not spaces, following convention.

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.

3 participants