author | francesco-ST <francesco.abbate@st.com> | 2010年08月06日 10:52:32 +0200 |
---|---|---|
committer | francesco-ST <francesco.abbate@st.com> | 2010年08月06日 10:52:32 +0200 |
commit | 3ad2c65d1580f0b28033b733a728347e0f81e5f7 (patch) | |
tree | 38ff96ffa3536d5a3358db6c3395b374b54807f6 /agg-plot/agg-parse-trans.cpp | |
parent | 2dd683d5721fbd9d740feacf90caee564752696c (diff) | |
download | gsl-shell-3ad2c65d1580f0b28033b733a728347e0f81e5f7.tar.gz |
-rw-r--r-- | agg-plot/agg-parse-trans.cpp | 13 |
diff --git a/agg-plot/agg-parse-trans.cpp b/agg-plot/agg-parse-trans.cpp index 4ec14748..368405fd 100644 --- a/agg-plot/agg-parse-trans.cpp +++ b/agg-plot/agg-parse-trans.cpp @@ -123,14 +123,11 @@ build_dash (lua_State *L, int specindex, typename context::base_type *obj) lua_pop (L, 1); lua_rawgeti (L, specindex, j+1); - if (lua_isnumber (L, -1)) - { - double b = lua_tonumber (L, -1); - dash.add_dash(a, b); - lua_pop (L,1); - } - else - break; + + double b = (lua_isnumber (L, -1) ? lua_tonumber (L, -1) : a); + + dash.add_dash(a, b); + lua_pop (L,1); } else break; |