This is a very small cleanup taken from D2142. Having the CRect conversion in an own function makes it consistent with all the other JS conversions, makes it easier to focus on the conversion for the one implementing it, and makes it reusable from other places.
Details
Details
- Reviewers
- None
- Commits
- rP22847: Add ToJSVal<CRect> to make the conversion reusable, remove unused…
Possibly develop an urge for better exception handling. Notice FromJSVal and the SpiderMonkey JS functions return a boolean, so it would seem logical in the long run to change ToJSVal from void to bool.
Diff Detail
Diff Detail
- Repository
- rP 0 A.D. Public Repository
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
Comment Actions
Successful build - Chance fights ever on the side of the prudent.
Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/70/display/redirect
Comment Actions
Successful build - Chance fights ever on the side of the prudent.
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/579/display/redirect