diff options
| author | Scott Shawcroft <scott@tannewt.org> | 2019-06-12 01:00:59 -0700 |
|---|---|---|
| committer | Scott Shawcroft <scott@tannewt.org> | 2019-06-12 11:36:43 -0700 |
| commit | a35d9b469d4ed65fd992771aa98ac57241983794 (patch) | |
| tree | 32dc9fc2dafd4ba1ff8d7982f4cb94ca1d68fa32 /shared-bindings/util.c | |
| parent | 6db4f4575420ef09faef244f8d3437884d939345 (diff) | |
Refactor deinit check to reduce code size.
Diffstat (limited to 'shared-bindings/util.c')
| -rw-r--r-- | shared-bindings/util.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/shared-bindings/util.c b/shared-bindings/util.c index 80a0bdaeb..c1ca01e0a 100644 --- a/shared-bindings/util.c +++ b/shared-bindings/util.c @@ -32,11 +32,9 @@ #include "shared-bindings/util.h" #include "supervisor/shared/translate.h" -// Check if pin is None. If so, deinit() has already been called on the object, so complain. -void raise_error_if_deinited(bool deinited) { - if (deinited) { - mp_raise_ValueError(translate("Object has been deinitialized and can no longer be used. Create a new object.")); - } +// If so, deinit() has already been called on the object, so complain. +void raise_deinited_error(void) { + mp_raise_ValueError(translate("Object has been deinitialized and can no longer be used. Create a new object.")); } |
