diff options
| author | suyambulingamrm <suyambu.rm@samsung.com> | 2014-05-26 19:32:56 +0530 |
|---|---|---|
| committer | suyambulingamrm <suyambu.rm@samsung.com> | 2014-05-26 19:32:56 +0530 |
| commit | 1ee11eb12e10ddefc6c5038e0471f50e32601806 (patch) | |
| tree | 2d4877ed45abbc72133b2464462beefebd4b867b /src/cairo-shapes.cpp | |
| parent | 2e3eb555e89f1a5a3d36f05c7484ac7b2a8bdcff (diff) | |
Issue #50. Removed hardcoded number of shapes.
Diffstat (limited to 'src/cairo-shapes.cpp')
| -rw-r--r-- | src/cairo-shapes.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cairo-shapes.cpp b/src/cairo-shapes.cpp index 56a3910..23972eb 100644 --- a/src/cairo-shapes.cpp +++ b/src/cairo-shapes.cpp @@ -86,7 +86,7 @@ cairoDrawRoundedRectangle (caskbench_context_t *ctx, shapes_t *args) } -void (*cairoShapes[5])(caskbench_context_t *ctx , shapes_t *args) = { +void (*cairoShapes[CB_SHAPE_END-1])(caskbench_context_t *ctx , shapes_t *args) = { cairoDrawCircle, cairoDrawRectangle, cairoDrawTriangle, @@ -105,7 +105,7 @@ cairoDrawRandomizedShape(caskbench_context_t *ctx, shapes_t *shape) // Shape Type if (shape->shape_type == CB_SHAPE_NONE) - shape->shape_type = (shape_type_t) (1 + (4.0 * rand())/RAND_MAX); + shape->shape_type = generate_random_shape(); // Stroke styles if (shape->stroke_width) |