From: Jean Privat Date: Mon, 24 Aug 2015 17:56:50 +0000 (-0400) Subject: Merge: Fix app.nit Calc example X-Git-Tag: v0.7.8~71 X-Git-Url: http://nitlanguage.org Merge: Fix app.nit Calc example Partial revert of cbbb5225 because the Android version of Calc need only `android::ui` and not `android`. The default entry point of `android` use `native_app_glue` as base activity/framework, whereas UI apps use `nit_activity`. This caused the apk file to show 2 activities in the launch menu. Also recent changes (probably) make calling `to_i` and thus `to_n` on empty strings crash. I've updated the calculator to avoid this with a new friendlier behavior in such cases. I've also updated `to_n` to return 0 on empty strings. This preserve the old behavior, it is a neutral fallback value and it fits with `"".is_numeric == true`. I did not touch `to_i`. Pull-Request: #1649 Reviewed-by: Jean Privat Reviewed-by: Lucas Bajolet --- 283e1122db0800895153a365873c5eccd40952de