Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

invariant reading for csv + internal simplifcation#18

Merged
H3idi-X merged 2 commits intounity3d-jp:dev/mainunity3d-jp/UnityChanSpringBone:dev/mainfrom
cyriaca:parse-invariantsCopy head branch name to clipboard
Dec 25, 2021
Merged

invariant reading for csv + internal simplifcation#18
H3idi-X merged 2 commits intounity3d-jp:dev/mainunity3d-jp/UnityChanSpringBone:dev/mainfrom
cyriaca:parse-invariantsCopy head branch name to clipboard

Conversation

@riina
Copy link
Contributor

@riina riina commented Dec 5, 2021

Fundamentally this is #17 (each fixes #16) but with additions

  • additional case of float in TextRecordParsing for consistency
  • using GetMethod (which in context works on all relevant types IsPrimitive besides IntPtr / UIntPtr) instead of GetMethods with LINQ
  • replacing TryParse with overloads instead of a new helper function

There are also a few unrelated internal changes listed below.

Changed

  • StringQueueObjectBuilder/TextRecordParsing Reading float data for CSV uses invariant culture (period as decimal separator) to ensure periods are used as decimal separator

Changed (minor / semantic)

  • UnityComponentStringListBuilder/StringQueueObjectBuilder: Simplified internal code using Where(del).First()/FirstOrDefault() to instead directly use delegate-consuming First/FirstOrDefault (same result, saves a layer on LINQ call)
  • TextRecordParsing: Adjusted a usage of a read-only collection in a method to be private class member to avoid potentially re-generating collection for every invocation unnecessarily
  • TypedStringToValueMap: replaced a ternary operator with null-coalescing
  • SaveSpringBoneSetupWindow: removed unused using directive

riina added 2 commits December 4, 2021 23:44
-StringQueueObjectBuilder/TextRecordParsing Reading float data for CSV uses invariant culture (period as decimal separator) to ensure periods are used as decimal separator
-UnityComponentStringListBuilder/StringQueueObjectBuilder: Simplified internal code using Where(del).First()/FirstOrDefault() to instead directly use delegate-consuming First/FirstOrDefault
-TextRecordParsing: Adjusted a usage of a read-only collection in a method to be private class member
-TypedStringToValueMap: replaced a ternary operator with null-coalescing
-SaveSpringBoneSetupWindow: removed unused using directive
@unity-cla-assistant
Copy link

unity-cla-assistant commented Dec 5, 2021

CLA assistant check
All committers have signed the CLA.

@H3idi-X
Copy link
Contributor

H3idi-X commented Dec 24, 2021

Apologies for this late replay. We didn't have time to see your pull request because of preparation for Siggraph Asia 2021 and so on. I started to check this.

@riina
Copy link
Contributor Author

riina commented Dec 24, 2021

Hello. Thank you for checking. I would like to add, with sincere apologies, I did miss a part in that first commit. I forgot to push the remaining part. I have done so now.

@H3idi-X H3idi-X merged commit ead9ef1 into unity3d-jp:dev/main Dec 25, 2021
@riina riina deleted the parse-invariants branch December 27, 2021 04:48
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

Comments

Close sidebar
Morty Proxy This is a proxified and sanitized view of the page, visit original site.