From c99e43124f3f9ff954acdb0de091b36d3ed91f26 Mon Sep 17 00:00:00 2001 From: Bryce Harrington Date: Mon, 5 May 2014 22:59:41 -0700 Subject: Rename Shapes enum to shape_type_t and fix enum names We already have a 'shapes' data structure, so to avoid confusion don't name our shape type enums 'Shapes'. Instead, name it shape_type_t, which is more consistent with the code style of other enums in the codebase. Also, rename Circle / Triangle / etc. to CB_SHAPE_CIRCLE / CB_SHAPE_TRIANGLE / etc. The former could be confused as class names; the latter are less likely to get confused this way, and follow the style of other enums in the codebase. --- src/caskbench.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/caskbench.cpp') diff --git a/src/caskbench.cpp b/src/caskbench.cpp index 81c4a07..6a05f5c 100644 --- a/src/caskbench.cpp +++ b/src/caskbench.cpp @@ -503,27 +503,27 @@ result_init(caskbench_result_t *result, const char* name) } int -convertToShapeID(const char* shapeName) +convertToShapeID(const char* shape_name) { int i =0; - if (shapeName == NULL) + if (shape_name == NULL) return 0; while (gShapes[i] != NULL) { - if (strcmp(gShapes[i], shapeName) == 0) + if (strcmp(gShapes[i], shape_name) == 0) return i + 1; i++; } } -fillType -convertToFillType(const char *fill_type) +fill_type_t +convertToFillType(const char *fill_name) { int i =0; - if (fill_type == NULL) - return (fillType) 0; + if (fill_name == NULL) + return (fill_type_t) 0; while (gFillTypes[i] != NULL) { - if (strcmp(gFillTypes[i], fill_type) == 0) - return (fillType) i ; + if (strcmp(gFillTypes[i], fill_name) == 0) + return (fill_type_t) i ; i++; } } -- cgit v1.3.1-4-g156e