gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
path: root/agg-plot/agg-parse-trans.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'agg-plot/agg-parse-trans.cpp')
-rw-r--r--agg-plot/agg-parse-trans.cpp 13
1 files changed, 5 insertions, 8 deletions
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;
generated by cgit v1.2.3 (git 2.25.1) at 2025年09月14日 21:45:46 +0000

AltStyle によって変換されたページ (->オリジナル) /