From a52eb88031620a81521b937f2a0651dbac2bb350 Mon Sep 17 00:00:00 2001 From: microDev <70126934+microDev1@users.noreply.github.com> Date: Mon, 15 Mar 2021 19:27:36 +0530 Subject: run code formatting script --- py/enum.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'py/enum.c') diff --git a/py/enum.c b/py/enum.c index 02a85a168..8dc83a9fb 100644 --- a/py/enum.c +++ b/py/enum.c @@ -29,7 +29,7 @@ mp_obj_t cp_enum_find(const mp_obj_type_t *type, int value) { const mp_obj_dict_t *dict = type->locals_dict; - for (size_t i=0; imap.used; i++) { + for (size_t i = 0; i < dict->map.used; i++) { const cp_enum_obj_t *v = dict->map.table[i].value; if (v->value == value) { return (mp_obj_t)v; @@ -42,11 +42,11 @@ int cp_enum_value(const mp_obj_type_t *type, mp_obj_t *obj) { if (!MP_OBJ_IS_TYPE(obj, type)) { mp_raise_TypeError_varg(translate("Expected a %q"), type->name); } - return ((cp_enum_obj_t*)MP_OBJ_TO_PTR(obj))->value; + return ((cp_enum_obj_t *)MP_OBJ_TO_PTR(obj))->value; } void cp_enum_obj_print_helper(uint16_t module, const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - (void) kind; + (void)kind; cp_enum_obj_t *self = self_in; mp_printf(print, "%q.%q.%q", module, self->base.type->name, self->name); } -- cgit v1.2.3